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 random import urllib.request def download_image(url): name = random.randrange(1,100) fullname = str(name)+".jpg" urllib.request.urlretrieve(url,fullname) download_image("http://site.meishij.net/r/58/25/3568808/a3568808_142682562777944.jpg")