May 2012

#api
#flickr
#python

Getting hold of your Flickr collections with Python


Recently I've been a little disappointed with Flickr, the popular online photo-sharing service. Photos gone missing, entire albums disappeared. Not really what you'd like to happen to your photo collection, especially when it's very large and therefore difficult to keep track of what's there and what's not.

I emailed the customer service people at Flickr. They promptly replied that it wasn't their fault but most likely a bug with other apps I had previously authorized to edit my Flickr collection (e.g., iPhoto or Aperture). Bad news: apparently whatever happened, what's lost is lost forever. Not much to my consolation, the same has happened to other people—for example, check this post or this post to see alternative versions of the problem from 2010 and 2007.

So I've suddenly realized the cloud isn't that secure a place, at least not yet. It's time to change strategy: use Flickr for sharing and my local hard drive for backup!

The good news is that if you know a little programming, you can download your entire Flickr collection without having to pay a cent, for example by using Python. There are a few free libraries out there for accessing the Flickr API, such as flickrpy and FlickrAPI. They both require you to fiddle a little with the code (at the very least, get a personalized API key from Flickr and add it to the Python program) in order to get what you want.

The one I've gone for instead is a little package called flickrtouchr, which is even easier to use. After downloading, you just have to run it from the command line and it will begin browsing your whole Flickr collection and downloading pictures at the highest resolution available. I have more than 8,000 photos, and it worked like a charm—beware though, it took more than 10 hours on my TalkTalk connection.

The beauty of flickrtouchr is its simplicity. Unlike other tools that require complex API authentication workflows, it handles everything automatically. It organizes downloads by Flickr sets, maintains the original folder structure, and even skips files you've already downloaded in previous runs—perfect for incremental backups.

Thanks Dan@hivelogic.com for writing this code—couldn't be asking for more!

[mac]@mike:~/Dropbox/code/python/_libs/dan-hivelogic-flickrtouchr-9ba645b>python flickrtouchr.py ~/Desktop/FlickrBackupFolder

In order to allow FlickrTouchr to read your photos and favourites you need to allow the application. Please press return when you've granted access at the following url (which should have opened automatically).

http://api.flickr.com/services/auth/?api_key\=e2245325378b5675b4af4e8cdb0564716fa9bd&perms\=read&frob\=8856734hhgbbhsksd19443-caa77e89367asbbhfa2ba-600258&api_sig\=a4aasdbbnb345c7fb46bdd33cfa65ec17bb32a

Waiting for you to press return

Egypt 1 ... in set ... Sharm el Sheik, Dec 2011 Egypt 2 ... in set ... Sharm el Sheik, Dec 2011 Egypt 3 ... in set ... Sharm el Sheik, Dec 2011 Egypt 4 ... in set ... Sharm el Sheik, Dec 2011

..... etc….

Cite this blog post:


Michele Pasin. Getting hold of your Flickr collections with Python. Blog post on www.michelepasin.org. Published on May 7, 2012.

Comments via Github:


See also:

2017


paper  Data integration and disintegration: Managing Springer Nature SciGraph with SHACL and OWL

Industry Track, International Semantic Web Conference (ISWC-17), Vienna, Austria, Oct 2017.



paper  Fitting Personal Interpretation with the Semantic Web: lessons learned from Pliny

Digital Humanities Quarterly, Jan 2017. Volume 11 Number 1


2007


paper  PhiloSURFical: browse Wittgensteinʼs Tractatus with the Semantic Web

Wittgenstein and the Philosophy of Information - Proceedings of the 30th International Ludwig Wittgenstein Symposium, Kirchberg, Austria, Aug 2007. pp. 319-335