Section 3.2. From a Search Engine


3.2. From a Search Engine

The current popular search engines have many great features, but they don't usually provide any form of feed for search results. Such a feed is extremely useful for people trying to keep track of specific search topics (for example, their name).

3.2.1. Google

I personally host a Google-to-RSS service, which you are free to use. It's at http://www.benhammersley.com/tools/google_to_rss.html. To use it, simply add your search request to the end of the URL http://www.benhammersley.com/tools/googlerss.cgi?q=. For example:

http://www.benhammersley.com/tools/googlerss.cgi?q=ben%20hammersley

Now, subscribe to that URL in your newsreader.

Note that I'm running this service from my own Google API key, which has a limit of 1,000 queries a day. If you'd like to help out, you can get your own key from http://www.google.com/apis/ and use it with your own queries. Add it to the URL with a &k=123456789 attribute, like this:

http://www.benhammersley.com/tools/googlerss.cgi?q=ben%20hammersley&k=123456789

The source code for this service is discussed in Chapter 10.

3.2.2. Google News

Google News searches can also be turned into feeds via a service hosted by Julian Bond, found at http://www.voidstar.com/gnews2rss.php.

That page has a form to help generate the feed's URL, or you can make it up yourself with this pattern:

http://www.voidstar.com/gnews2rss.php?num=number_of_items&q=your_query

Note that this Google News service is for personal aggregators only and not for redisplay on another web site. The source code for this service is in Chapter 10.

3.2.3. Yahoo!

Despite its tiresomely exclaiming name, Yahoo! goes one better than Google in that it provides feeds of its News Search results as standard. For example, go to http://search.news.yahoo.com/search/news/?c=&p=Conkers for news of the greatest autumnal sport, and look for the standard orange XML logo. It's impossible for me to give you a shortcut URL structure, however, because Yahoo! employs redirects.

The standard Yahoo! search does not provide results in feeds, and no one has, as yet, produced a service to do so. Now's your chance.

One service that is being provided is the My Yahoo! to RSS facility run by Mikel Maron. The site (http://brainoff.com/myy2rss/) takes your My Yahoo! username and password and returns an RSS feed of any personalized Stock Quotes, Weather, Movie Listings, and Yahoo! Mail alerts you may have set up on your My Yahoo! page.

As with the Yahoo! News Search service, the URL pattern is too obscure to print here, so you have to go through the service's main page.



    Developing Feeds with RSS and Atom
    Developing Feeds with Rss and Atom
    ISBN: 0596008813
    EAN: 2147483647
    Year: 2003
    Pages: 118

    flylib.com © 2008-2017.
    If you may any questions please contact us: flylib@qtcs.net