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 urllib.request import os img_url = "https://betanews.com/wp-content/uploads/2017/09/firefox-logo.jpg" img_name = os.path.basename(img_url) urllib.request.urlretrieve(img_url,img_name)