Created
February 7, 2016 13:14
-
-
Save libbymiller/58aa7d719741809bd20a to your computer and use it in GitHub Desktop.
flickr download script with flickraw
This file contains 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
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