Ruby script to download all the photos from a flickr: group pool, user's photostream, photosets and favorites
Checkout the code:
git clone git://github.com/mrtuxhdb/flickr-photo-downloader.git
cd flickr-photo-downloader
Install bundler:
gem install bundler
bundle install
Change FlickRaw.api_key
and FlickRaw.shared_secret
value with your
API key and shared secret
FlickRaw.api_key="... Your API key ..."
FlickRaw.shared_secret="... Your shared secret ..."
Change flickr.access_token
and flickr.access_secret
value with your
access_token
and access_secret
(you can get it with
flickr_auth.rb)
# Get your access_token & access_secret with flick_auth.rb
flickr.access_token = "... Your access token ..."
flickr.access_secret = "... Your access secret ..."
Run the script, specifying your photostream, photoset or favorites URLs as the argument:
ruby flickr-photo-downloader.rb http://www.flickr.com/groups/aodai/pool http://www.flickr.com/photos/jethuynh/sets/72157633130184165/
By default, images will be saved in folder Pictures
on user directory
(eg /home/mrtux/Pictures). If you want them to be saved to a
different directory, you can pass its name as an optional -d
argument:
ruby flickr-photo-downloader.rb http://www.flickr.com/groups/aodai/pool -d ~/Pictures/AoDai
You can import link from input-file
with -i
argument and
export all photo links to output-file
with -o
argument
ruby flickr-photo-downloader.rb -i input.txt -o urllist.txt
More help and options
ruby flickr-photo-downloader.rb --help
Enjoy!
Source code released under an MIT license
Pull requests welcome.
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Added some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request
- Dương Tiến Thuận (@mrtuxhdb)