Date-Range Searching with a Client-Side Application

Monitor a set of queries for new finds added to the Google index yesterday.

The GooFresh [Hack #42] hack is a simple web form-driven CGI script for building date range [Hack #11] Google queries. A simple web-based interface is fine when you want to search for only one or two items at a time. But what of performing multiple searches over time, saving the results to your computer for comparative analysis?

A better fit for this task is a client-side application that you run from the comfort of your own computer’s desktop. This Perl script feeds specified queries to Google via the Google Web API, limiting results to those indexed yesterday. New finds are appended to a comma-delimited text file per query, suitable for import into Excel or your average database application.

Tip

This hack requires an additional Perl module, Time::JulianDay (http://search.cpan.org/author/MUIR/); it just won’t work until you have the module installed.

The Queries

First, you’ll need to prepare a few queries to feed the script. Try these out via the Google search interface itself first to make sure you’re receiving the kind of results you’re expecting. Your queries can be anything you’d be interested in tracking over time: topics of long-lasting or current interest, searches for new directories of information [Hack #21] coming online, unique quotes from articles or other sources that you want to monitor for signs of plagiarism.

Use whatever special syntaxes ...

Get Google Hacks now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.