How to get a lot of photos …
May 14, 2009 on 2:43 pm | Tags: flickr | In Dev, Development, General, Tagging | No CommentsI’m currently testing a new implementation of an approximate search index for content based image retrieval. Especially the performance tests have become interesting as I didn’t have access to a real big data size. So what to do?
Actually I programmed a lot of spiders and grabbers before, so I knew that there is a lot of data available on Flickr
But I was still searching for an easy way. Now here is my approach (using of course bash):
wget -q -O - http://api.flickr.com/services/feeds/photos_public.gne?format=atom | grep -o .............static.*m.jpg | wget -i -
Why should this work?
- The first wget command gets a list of recent photos as atom feed.
- The grep command gets out all the medium sized (suffix “m.jpeg”) pictures
- The lot of dots and the static are just a nice trick to get the right ones, the real image content.
- Finally the second wget downloads the images from the server.
Issuing this command one should get ~ 25 photos in one go. Using a bash loop or a cronjob you can get of course a lot more in an unattended way
No Comments yet »
RSS feed for comments on this post. TrackBack URI
Leave a comment
© 2004-2007 by Mathias Lux
>> Contents of this page are licensed under the CreativeCommons Attribution 2.5 license <<