WWW::Search::WashPost - WWW::Search backend for searching www.washingtonpost.com
use WWW::Search; my $oSearch = new WWW::Search('WashPost'); my $sQuery = WWW::Search::escape_query("japan prime minister"); $oSearch->native_query($sQuery); while (my $oResult = $oSearch->next_result()) { print $oResult->url, "\n"; }
This class is a specialization of WWW::Search. It handles making and interpreting searches on news at The Washington Post http://www.washingtonpost.com.
This class exports no public interface; all interaction should be done through WWW::Search objects.
In the resulting WWW::SearchResult objects, the following elements will be set (in addition to the usual title, description, etc.):
Something like "Post" or a certain "Edition".
The page number of the print edition, e.g. "E05".
The type of item found, either "Article" or "Photo".
The author or photographer.
To make new backends, see WWW::Search.
This backend (and all its subclasses) only searches news stories from the last 14 days. (This is a restriction on the Washington Post website that we can not avoid.)
Please tell the author if you find any!
Martin Thurn <mthurn@cpan.org>
Copyright (C) 1998-2009 Martin 'Kingpin' Thurn
This software is released under the same license as Perl itself.
To install WWW::Search::News, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Search::News
CPAN shell
perl -MCPAN -e shell install WWW::Search::News
For more information on module installation, please visit the detailed CPAN module installation guide.