

Once it's done, you should have a local mirror of all your Flickr data. Run through the authentication procedure, and then just wait for it to finish. If you just want to immediately downsync all your data right now, simply use the test.js application with the -downsync runtime argument: add your Flickr API key information to the. Downloading shortcut: one-step downsyncing userdata/me/ directory that contains the images and ia dirs with your personal data. data for the flickr API information, but also a.
Node flickr gallery code#
Opinionsįor me it has been a really good learning experience, especially considering the fact that it was a good scenario to use asynchronous code dealing with several parallel Http requests.Īs I still consider it a learning experience I would really love you (probably more experienced than me with Node.js) to give some opinions, critics, new (flickrOptions, flickrapi.downsync("userdata/me")) Again, more precise informations are included in the official documentation. It’s a small side project anyway so I don’t expect to put so much effort on it again unless it gets adopted by a relevant number of people (which, quite frankly, is really unlikely to happen).īeing an open source project I obviously tried to put in place all the basic infrastructure (tests, code standards, repository, versioning, etc.) to make it easy for other people to work on improving it. It’s to be considered ALPHA quality and I expect it to be fully of bugs and uncovered edge cases. The project has been developed in a weekend as a “learning project” and tested just by me on few Flickr galleries. If you’re interested on using it I suggest you to read the official documentation on GitHub, but it should be quite easy to understand and use it if you are a developer (and it’s not meant to be used by other people who are comfortable with the command line!) Current status You can find out how I implemented this specific logic on GitHub. Thanks to the Async.parallelLimit() function it’s even possible to run the tasks with a configurable concurrency level. Then I just needed to replicate this task for every photo and run all of them in parallel. Thanks to Async it was very easy to create a task function that figured out the specific URL of a given photo and then downloads it into a file. The first API call is the starting point and then, since you now have all the IDs, you can make all the other requests in parallel.
Node flickr gallery download#
Once you got the URL you can simply use that to download a photo into your local drive. This method gives you all the URLs to download all the different sizes of a given photo. Then, to find out the URL of every photo you need to call the API method. To download a photo from Flickr, starting from a gallery, you need to make several API calls before you have the right URL to download the photo.įirst of all you need to call the API method to find out the IDs of all the photos in the set. Going asynchronous and execute requests in parallel

I also wasn’t able, after a quick search, to find something simple to solve this task. To be honest I had myself the need to download a large set of photos (more than 400 photos) from Flickr and I didn’t wanted to do it manually. I recently developed a small command line app that allows you to download an entire gallery from Flickr, it’s called flickr-set-get and you can find it on NPM and GitHub. #javascript, #http, #node-js, #api, #flickr comments
