Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
flickr download script with flickraw
require 'flickraw'
require 'pp'
FlickRaw.api_key="xxx"
FlickRaw.shared_secret="xxx"
flickr.access_token = "xxx"
flickr.access_secret = "xxx"
login = flickr.test.login
list = flickr.people.getPhotos :user_id => "me", :min_taken_date => "2013-08-16 00:00:00", :max_taken_date => "2013-08-17 00:00:00"
pp list
list.each do |l|
id = l.id
secret = l.secret
info = flickr.photos.getInfo :photo_id => id, :secret => secret
puts info.title # => "PICT986"
puts info.dates.taken # => "2006-07-06 15:16:18"
sizes = flickr.photos.getSizes :photo_id => id
original = sizes.find {|s| s.label == 'Original' }
puts original.source # => "800" -- may fail if they have no original marked image
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.