Flickr Downloader

Yesterday, a friend of mine was looking for a way to download original photos from one of his sets on flickr. Since we could not find any flickr downloader which can run on Linux, (for windows you can try : http://flickrslideshow.fateback.com/), I quickly wrote a script using flickr APIS. The sed and awk power made it v. easy :)

Below is the script:

SET=”<Set – id >” # Enter SET ID here from which photos have to be downloaded, for eg. SET=”72157604130281022″
APPKEY=”" #Your APP key here, get one from http://www.flickr.com/services/api/keys/
curl “http://api.flickr.com/services/rest/?method=flickr.photosets.getPhotos&
api_key=$APPKEY&photoset_id=$SET&extras=original_format&per_page=500″ | sed ‘~s/title=”[a-zA-Z0-9_ :) ?(.]*//g’ | awk ‘/id=/ {print “http://farm3.static.flickr.com/”$4″/”$2″_”$8″_o.jpg” }’ | sed ‘~s/\(server=\|originalsecret=\|id=\|”\)//g’ > p
wget -i p
rm p

You can also download this script by clicking here

Update: Script does not work for video download.

Share and Enjoy:
  • del.icio.us
  • Digg
  • Facebook
  • StumbleUpon
  • email
  • Twitter
  • Yahoo! Buzz
 
  • Thanks! You're script needs a little tweaking to bring it up to date btw:

    awk '/id=/ {print "http://farm"$6".static.flickr.com/"$5"/"$2"_"$4".jpg" }' | sed '~s/\(farm=\|server=\|secret=\|id=\|"\)//g'

  • Thanks, Jamie for pointing this. I have updated the script!

  • mlissner

    Useful script. I had trouble making it work since I downloaded the file, and apparently it was in Unix format, or something. It wouldn't run until I had copied the contents out, and pasted them in another file.

  • James

    This is very useful!

  • yes this script will work for any account. Just put in set id of any user.

  • Nice to see you here :)

  • Finally, I get here!

blog comments powered by Disqus

Tweets