python download image from url and save code example
Example 1: download image python
import urllib.request
image_url = 'https://bit.ly/2XuVzB4' #the image on the web
save_name = 'my_image.jpg' #local name to be saved
urllib.request.urlretrieve(image_url, save_name)
Example 2: save image url to png python
import urllib.request
#python 3
urllib.request.urlretrieve(url, filename)