May 2012

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 it's difficult to be always on top of what's there and what's not.. Time to change strategy: use flickr for sharing and my local HD for backup!

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 authorised to edit my Flickr collection (e.g. iPhoto or Aperture). Bad news: apparently whatever happened now what's lost is lost forever. Not much to my consolation, the same 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 realised the cloud isn't that secure a place, as yet. It's time to change strategy: use flickr for sharing and my local HD 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 APIs, such as flickrpy and FlickrAPI. They both require you to fiddle a little with the code (at the very least, get a personalised passkey 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'll begin browsing your whole Flickr collection and download pictures at the highest resolution available. I have more than 8000 photos, and it worked like a charm - beware though - it took more than 10 hours on my TalkTalk connection.

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:


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