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)

download_web_image("http://www.turktarihim.com/resimler/1440339215_buyuk.jpg")

url girin ve calıstırın

run the program

output :