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 :, 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
curl “
api_key=$APPKEY&photoset_id=$SET&extras=original_format&per_page=500″ | sed ‘~s/title=”[a-zA-Z0-9_ :) ?(.]*//g’ | awk ‘/id=/ {print “”$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:
  • 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""$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