Name
GoogleHack::Search - this is a very simple interface to the Google API. It makes it easier for querying Google.
SYNOPSIS
use GoogleHack::Search;
my $search = GoogleHack::Search->new();
$search->searchPhrase($searchString);
If required you can set search parameters with following functions:
$search->setMaxResults($param) $search->setlr($param) $search->setoe($param) $search->setie($param) $search->setStartPos($param) $search->setFilter("bool") $search->setSafeSearch("bool") $search->setRestrict("bool")
DESCRIPTION
This module provides a simple interface to the Google API. It is used by the GoogleHack driver module.
AUTHOR
Pratheepan Raveendranathan, <rave0029@d.umn.edu>
Ted Pedersen, <tpederse@d.umn.edu>
BUGS
SEE ALSO
GoogleHack home page Pratheepan Raveendranathan Ted Pedersen
Google-Hack Maling List <google-hack-users@lists.sourceforge.net>
COPYRIGHT AND LICENSE
Copyright (c) 2003 by Pratheepan Raveendranathan, Ted Pedersen
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.
You should have received a copy of the GNU General Public License along with this program; if not, write to
The Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
PACKAGE METHODS
__PACKAGE__->new(\%args)
Purpose: This function creates an object of type Search and returns a blessed reference.
__PACKAGE__->init(\%args)
Purpose: This this function can used to inititalize the member variables.
Valid arguments are :
key
string. key to the google-api
File_location
string. This the wsdl file name
adverbs_list
string. The location of the adverbs list file
verbs_list
string. The location of the verbs list file
adjectives_list
string. The location of the adjectives list file
nouns_list
string. The location of the nouns list file
stop_list
string. The location of the stop_words list file
__PACKAGE__->setMaxResults(\%args)
Purpose: This this function can used to set the maximum number of results retrieved.
Valid arguments are :
maxResults
number. Number of results you want to be able to retrieve .
__PACKAGE__->setlr(\%args)
Purpose: This this function can used to set the language restriction
Valid arguments are :
lr
string. Language Restricion eg lang_eng
__PACKAGE__->setoe(\%args)
Purpose: This this function can used to set oe
Valid arguments are :
oe
string.
__PACKAGE__->setie(\%args)
Purpose: This this function can used to set ie
Valid arguments are :
ie
string.
__PACKAGE__->setStartPos(\%args)
Purpose: This function sets the startposition for the search results
Valid arguments are :
StartPos
string.
__PACKAGE__->setFilter(\%args)
Purpose: This functions sets the search filter as on or off
Valid arguments are :
Filter
boolean. True or False
__PACKAGE__->setRestrict(\%args)
Purpose: this funciton restricts the search to a specific domains
Valid arguments are :
Restrict
String. UncleSam for the US Government
__PACKAGE__->setSafeSearch(\%args)
Purpose: This functions enables safe search, Restricts search to non-abusive material.
Valid arguments are :
Restrict
Boolean. "True" or "False".
__PACKAGE__->Search(\%args)
Purpose: This function is used to query googles
Valid arguments are :
$searchString
string. Need to pass the search string, which can be a single word or phrase, maximum ten words
num_results
integer. The number of results you wast to retrieve, default is 10. Maximum is 1000.
Returns: Returns a Search object containing the search results.
__PACKAGE__->getEstimateNo(\%args)
Purpose: This function returns the number of results predicted by google for a specific search term.
No Valid arguments.
Returns: Returns the total number of results for a search string..
__PACKAGE__->IamFeelingLucky(\%args)
Purpose: This function imitates the "I am Feeling Lucky" search feature of Google. It basically returns the URL of the first result of your search.
No Valid arguments.
Returns: Returns the URL of the first result of your search.
__PACKAGE__->getCachedPage(\%args)
Purpose: This function retrieves a cached webpage, given the URL.
No Valid arguments.
Returns: Returns the contents of as web page given a URL.