Tagging using the Flickr API
June 11, 2007
My goal for the day was to geotag the mongage images I uploaded last week. Luckily each image title contains the latitude and longitude of the camera so I extracted the data from the title and added it back in the image tags.
Here is what I did:
- Got a Flickr API key and authentication code from the Flickr services website.
- Installed Beej’s Python Flickr API.
- Downloaded and extracted archive.
- Called python setup.py build.
- Called python setup.py install.
- Edited flickrapi.py to properly call firefox from the Windows command line (added double quotes around the URL in
validateFrob).
- Wrote a python script to extract the title, parse it, and upload the new tags (I started with the test script Beej provides).
- It took a while to realize I needed to include both the method and auth_token parameters for the photo.setLocation and photo.addTags methods.
Entry Filed under: information technology, programming, social software. .





Trackback this post | Subscribe to the comments via RSS Feed