Skip to content

Instantly share code, notes, and snippets.

@ck196
Created January 27, 2016 04:29
Show Gist options
  • Save ck196/87de180501c9cc8fdcd5 to your computer and use it in GitHub Desktop.
Save ck196/87de180501c9cc8fdcd5 to your computer and use it in GitHub Desktop.
Flick search api
# 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