I have a lot of URLs which I need to download and save the image file as a local file. When I use my browser I can download the Image but in my code I get a ConnectionError.
The problem is when I use a URL of an Image from the web my code works correctly:
import wget
import requests
local_file = open('local_file.png','wb')
url = "https://ws.addons.om.prod/subom/mg/prod/contracts/contracts1082/C17510266/401032029940E66_photo_type_identity_front_1613034513765.jpg"
resp = requests.get(url, stream=True,verify=True ,timeout=60)
local_file.write(resp.content)
local_file.close()