Tuesday, May 03, 2005

Argh, inTune & Google Web API

inTune currently uses amazon.com's (very cool) web api to find links to cover art for music files. However, in the case when no cover art exists (most likely because amazon.com does not sell any albums by the given artist) I wanted to use Google's API as a backup. Ah, yes, sounds like a reasonable plan BUT that's assuming Google's API actually exposes their image search functionality. It does not! So, I probably will not support Google in inTune's initial release.

I guess I could, of course, build a scraper that simply appends the artist and/or album onto the end of 'http://images.google.com/images?q=' and grabs the first image that pops up.

But I don't feel like it.

Update (10:42PM May 3, 2005): Fine! So, I have been obsessing over actually using Google's image search. I'm sorry. I'm coding and thinking at the same time (yes, that actually happens sometimes). I typed in "scraping images.google" into Google and, shameslessly, Google answered my call. The first result was Mr. Dan Fernandez who is also Mr. Visual C# Product Manager and in promoting said language hacked together an images.google.com scraper. Ack. I just noticed that this is for VS2005 which I don't have and is also for Visual C# Express. (link)

Update (9:36PM May 6, 2005): OK. Google does not expose their image search capabilities in their API, but yahoo does. I might still write a Google image scraper (for curiosity's sake) but I'd rather not spend too much time on it given that (1) it's questionably legal and (2) harder to maintain given that you're dependent on the format of the webpage.

No comments: