Google/Flickr Image Scraper
I wrote a small app to grab pictures from Google Images based on a query string. It was a short exercise in concurrent programming, more than anything else. Lesson learned: the Java 1.5 concurrency APIs don't make the producer/consumer design pattern as easy as you might think, particularly when it comes to producer shutdown.
After wrapping up the Google images scraper my friend Gwilli pointed out that Flickr is a much better resource for this sort of thing. D'oh! Fortunately it was a very small change to scrape their database, too.
- Make sure you have Java 1.5 or Java 6. Download googlor.jar.
- Run java -jar googlor.jar (in OS X, just double-click the jar file)
- The fields are pretty straightforward. By default images will go into the images/ subdirectory of the current working directory.
- When images are presented, press 'j' to junk them or 'k' to keep them. That's it.
(I should point out, the images grabbed from Flickr are low-res, maximum 500x500. This is a good fit for the XO's screen)