I got a problem when I am using python to save an image from url either by urllib2 request or urllib.urlretrieve. That is the url of the image is valid. I could download it
import requests img_data = requests.get(image_url).content with open('image_name.jpg', 'wb') as handler: handler.write(img_data)