NAME
WWW::Search::Scrape - Scrape search engine results
VERSION
Version 0.01
SYNOPSIS
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->{num}});
DESCRIPTION
DESCRIPTION
Most search engines do not provide full-function search API.
Google finally shut down its Google search API on Sept 2009, while the registration for Google Search API had been disabled for years actually. The follower -- Google AJAX API, is simple not satisfied enough. That is why I wrote this module.
The purpose of this module is provide a simple interface to extract top search results from Google search engine, and keep this interface as simple as possible (as soon as possible as well).
Currently, it supports 'google.com' only. And maybe English as well. I schedule to add more functions soon.
EXPORT
There is only one function in WWW::Search::Scrape -- search.
FUNCTIONS
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 + +---------+-------------------------------------------------------------------------+
AUTHOR
Quan Sun, <cfk.quan at gmail.com>
BUGS
Please report any bugs or feature requests to bug-www-search-scrape at rt.cpan.org
, or cfk.quan@gmail.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.
SUPPORT
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
AnnoCPAN: Annotated CPAN documentation
CPAN Ratings
Search CPAN
ACKNOWLEDGEMENTS
COPYRIGHT & LICENSE
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.