capint
4/2/2017 - 1:48 PM

Python >> Download image

Python >> Download image

import random
import urllib.request

def download_web_image(url):
  name = random.randrange(1,1000)
  full_name = str(name) + ".jpg"
  urllib.request.urlretrieve(url, full_name)