WWW::Search::Scrape - Scrape search engine results
Version 0.08
use WWW::Search::Scrape qw/:all/; my $result = search({engine => 'google', keyword =>'keywords', results => 10}); print "Google returns " . $result->{num} . " results\n"; print $_, "\n" foreach (@{$result->{results}});
Most search engines do not provide search API.
Google finally stop its Google search API in Sept 2009, while the registration for it had already been disabled for years. Google AJAX API is not powerful enough.
The purpose of this module is to provide a simple interface to extract top search results from Google search engines (as well as others), and keep this interface as simple as possible (as soon as possible as well).
Currently, it supports English Google and Bing only. I schedule to add more functions soon.
There is only one function in WWW::Search::Scrape -- search.
search is the most important function in this module. It is used as a dispatcher for corresponding search engines -- Google, Yahoo, Bing etc.
It accepts a config hash. Possible keys are,
+---------+--------------------------------------------------------+ | engine | The name for the search engine, like 'google', 'bing' | +---------+--------------------------------------------------------+ | keyword | The keyword(s) for the searching terms | +---------+--------------------------------------------------------+ | results | How many results should be returned (default: 10) | +---------+--------------------------------------------------------+
It returns a hash ref
+---------+-------------------------------------------------------------------------+ | num | How many items the search engine are able to return? (estimated number) | +---------+-------------------------------------------------------------------------+ | results | List of returned results + +---------+-------------------------------------------------------------------------+
Quan Sun, <qsun at pardiff.com>
<qsun at pardiff.com>
Please report any bugs or feature requests to bug-www-search-scrape at rt.cpan.org, or qsun@pardiff.com, or through the web interface at http://rt.cpan.org/NoAuth/ReportBug.html?Queue=WWW-Search-Scrape. I will be notified, and then you'll automatically be notified of progress on your bug as I make changes.
bug-www-search-scrape at rt.cpan.org
qsun@pardiff.com
http://github.com/qsun/WWW-Search-Scrape
You can find documentation for this module with the perldoc command.
perldoc WWW::Search::Scrape
You can also look for information at:
RT: CPAN's request tracker
http://rt.cpan.org/NoAuth/Bugs.html?Dist=WWW-Search-Scrape
AnnoCPAN: Annotated CPAN documentation
http://annocpan.org/dist/WWW-Search-Scrape
CPAN Ratings
http://cpanratings.perl.org/d/WWW-Search-Scrape
Search CPAN
http://search.cpan.org/dist/WWW-Search-Scrape/
Copyright 2009 Quan Sun.
This program is free software; you can redistribute it and/or modify it under the terms of either: the GNU General Public License as published by the Free Software Foundation; or the Artistic License.
See http://dev.perl.org/licenses/ for more information.
To install WWW::Search::Scrape, copy and paste the appropriate command in to your terminal.
cpanm
cpanm WWW::Search::Scrape
CPAN shell
perl -MCPAN -e shell install WWW::Search::Scrape
For more information on module installation, please visit the detailed CPAN module installation guide.