


Flickr forever: Creating the safest most inclusive : API requirement for developersįlickr staff requesting help from members in the UK to troubleshoot slowness The mixture of exhaustion, elation, pride, amazement, and wonder on his face is just delightful.This thread was closed automatically due to a lack of responses over the last month. This is Neil Armstrong back in the LEM after he and Buzz Aldrin have taken their walk on the Moon. I do, too, but my favorite is this one, which I’ve seen many times before: I suspect most people will like the images of the Earth or the Moon or the various pieces of equipment. But then there are the good ones, and they are really good. Many of the photos are out of focus, poorly framed, or just plain dull. The -u switch at the end of the shebang line (Line 1) tells Python to run unbuffered and display the messages as the script runs. Python would normally buffer this kind of output and display it only after the script is finished-which would defeat the purpose of the messages. To let you know that things are working, a message is printed whenever the script moves to a new album (Line 17) and a dot is printed whenever a photo has been downloaded (Line 27). The photos you end up with are the highest resolution versions because why bother with anything else? The subfolders will have the same names as the Flickr albums, 1 and the photo files will have same names as the Flickr photos. It will first create an apollo folder on your Desktop (Lines 9–10) and then fill it with subfolders and photos. Here’s apollo-photo-list, the one that gathers the information: python:ġ3: s = (photo_id=id)ġ8: flickr = FlickrAPI(key, secret, format='parsed-json')ġ9: psets = (user_id=nasa)Ģ1: for set in psets:Ģ2: print '".jpg".format(subdir, p)Īssuming you have both it and apollo.json on your Desktop, you run it like this from the command line: cd ~/Desktop Of course, I’m still going to show you both of my scripts. Having the information file will allow you to skip the most time-consuming part of the process. Far and away, most of the time is spent gathering the information from the API-the downloads themselves are relatively quick. For whatever reason, Flickr’s responses are incredibly slow.
Flickr gallery stolen install#
No need to install the flickrapi library, and more important, no need to wait through all the API calls.
Flickr gallery stolen download#
All you’ll need to download the Apollo photos are a standard Python distribution (the one that comes with OS X will do), the information file, and my second script. I save the information gathered in the first step in a file that the second script reads.īreaking up the functionality this way didn’t help me, but it will help you, because I’m making the file with all the information gathered through the Flickr API available to download. The fundamental difference between our approaches is this: Ryan does both of these steps in a single script, whereas I use one script for the first step and another for the second.
Flickr gallery stolen code#
I didn’t know until today that he’d posted the code he used as a Gist, which would’ve saved me some of the time I spent writing my my own scripts.
