How to download image by using python script


Video Link:



Source Code:

import random
import urllib.request
def fun(url): # create a function
 
    imagename = random.randrange(1,500)
    #by using random function we creating the name for the image
 
    converttostring = str(imagename) +".jpg"
    urllib.request.urlretrieve(url,converttostring)

fun("http://blackownedmagazine.com/wp-content/uploads/2015/02/subscribe.png")



Comments

Popular posts from this blog

Zoho Second round - adding a digit to all the digits of a number

Artificial Intelligence