Friday, June 28, 2013

Bing Image Parser

How many people have noticed the different images that are displayed on the home page of the search engine Bing? I used to visit the Bing homepage just to check the image each day. As an aside you can get some trivia on the US version of the site.



It was then that I had an idea to see if there was a way to automate the way to see different images that are provided by Bing. After a search, done ironically, on well "Google" (Searching on Google is like second nature for me), I was able to get an RSS feed URL for the Bing images, and able to parse it using a small Java application.

The reason behind choosing a source which gives data as RSS is that it is a standard. What the core of this application does is parse an RSS Feed. The other functionality like console, ability to save image and other settings are built around this core. So essentially this can be reused to parse other RSS Feeds.
The UI is not very fancy, it is a invoked via command line and there is a windows shell script that can be used to run it easily. (Make sure you have Java runtime installed). If you don't want the source code, you can grab a build file (zip file with the application and shell script file) from GitHub.

After getting the build file, extract it to a folder, edit the "settings.properties" file and run the "run-biotd.cmd" file. If you are opting to save the images to disk, make sure that the folder specified exists.



The entire eclipse project is now available at GitHub and licensed under the "Apache License Version 2.0" at the link below.
https://github.com/midhunhk/the-bing-image-of-the-day-parser

Build no 0.4.5 is available at
https://github.com/midhunhk/the-bing-image-of-the-day-parser/blob/master/BIotD/builds/BIotD_0.4.5.zip

Make sure to check these out and watch out for future updates. You can use this source code to parse any other RSS feed response and make an awesome app, so don't wait up.

No comments: