Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- cis = pix.image_search(q='',
- response_group = 'high_resolution',
- safesearch = 'true',
- order = 'latest',)
- i=1
- myPath="C:\\Users\\Freeware Sys\\Desktop\\pix"
- while i<10:
- print(cis['hits'][i]['largeImageURL'])
- u =cis['hits'][i]['largeImageURL']
- fullfilename = os.path.join(myPath, 'filename.jpg')
- print('Downloading file ',i)
- print(fullfilename)
- filename=u.split('/')[-1]
- urllib.request.urlretrieve(u,filename)
- i+=1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement