Created
January 27, 2016 04:29
-
-
Save ck196/87de180501c9cc8fdcd5 to your computer and use it in GitHub Desktop.
Flick search api
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Using flickr_api to search and download images | |
# https://github.com/alexis-mignon/python-flickr-api/wiki/Tutorial | |
import flickr_api as f | |
f.set_keys(api_key = 'xxxxxxxxxxxxxxxxxxxxxxx', | |
api_secret = 'xxxxxxxxxxx') | |
auth = f.auth.AuthHandler() | |
w = f.Walker(f.Photo.search, tags="sumo") | |
count = 0 | |
for photo in w: | |
try: | |
photo.save("images/" + photo.id + ".jpg" ) | |
except: | |
pass | |
count = count + 1 | |
if count == 1001: | |
break | |
#p.save(filename, size_label = 'Medium 640') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment