After buying a Flickr Pro account at the beginning of the summer and uploading all of my photos, I wanted an automatic way of uploading my photos from my camera. I already had a Python script that renamed all of my photos to the date and time they were taken, so all I had to do was get a module that would upload them to Flickr. It turns out I had a bit of trouble doing that, and I had to modify someone else’s code to make it work, which was not very fun.
Anyway long story short, I recently rewrote most of the code from scratch for fun over break. What makes my Flickr Uploader Python library different from all of the other ones out there is that mine uses JSON instead of XML to talk to Flickr. I am most proud of the authentication code, but for some reason Flickr does not support JSON for file uploads, so I had to resort to XML. I also found out that Python does not have built in support for HTTP file uploads, so I had to copy code from somewhere else for that.
Download the code: flickr.zip (16.8 KB)
3 Comments
Hello!
I’m using your code on another project… http://sourceforge.net/projects/miniaturizador/ and… on yours, you’re using md5 library… I wonder if you’ve updated your code to use hashlib library instead. If not, no problem … I myself will update…
Thanks for your work, very useful!
I have not recently updated the code, mostly because I now have an Eye-Fi. Depending on what I do in the future, I may update this code, but I also might likely just use http://stuvel.eu/projects/flickrapi
Ok, thanks a lot… When I’ve decided to use your code I’ve seen also this project, but on that moment, I don’t remember why… I preferred to use yours…
I’ll look again that option.
Post a Comment