O'Reilly Hacks
oreilly.comO'Reilly NetworkSafari BookshelfConferences Sign In/My Account | View Cart   
Book List Learning Lab PDFs O'Reilly Gear Newsletters Press Room Jobs  

Google feed generator
Generate an RSS feed from new Google search results.

Contributed by:
Gary Burd
[11/10/03 | Discuss (0) | Link to this hack]

The Python script googlefeed generates an RSS file from Google search results.

The script examines up to 1000 query results, the maximum allowed by the Google API. To keep the size of the feed manageable, the feed does not include search results found on the first run of the script or search results found more than three days ago. In other words, the feed includes new search results found during the last three days.

The usage is:

python googlefeed.py key query state_path rss_path
A Google API license key. You can obtain a license key from the Google API page.
A Google search string.
Path to file used to track previous search results.
Path to the generated RSS file. To enable optimal use of conditional GET, the RSS file is only updated if it actually changes.

O'Reilly Home | Privacy Policy

© 2007 O'Reilly Media, Inc.
Website: | Customer Service: | Book issues:

All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.