by Fabrizio Coccetti, created 20040308, last update 20040908
| Software List |
| Search engine in perl for Google |
Using the search.pl script, written in
perl, you can automatically query Google, save your results is a file,
and much more. Installation steps:
Usage and options: search.pl <search-phrase> [OPTIONS]
Options (unique abbraviations are allowed):
-f, --file output goes to file
-h, --help display this help and exit
-l, --language return only pages written in language (XY)
(use en for English, fr for French, ...
-k, --key specify your google-key (mandatory)
-r, --results number of URL results to display
-w, --waiting wait time after one query of 10 URLs (to query google nicely)
The argument -k (--key) is mandatory,
to obtain you personal key, register at http://www.google.com/apis/
Examples: search.pl "Hello world" --key=+mZ2pfxxyyxxyyxxyyxxyyxxyyxxyyxx search google.com for the string "Hello World", using your personal key, you get 10 URLs. search.pl "Hello world" -l it -r 500 -f res.txt -k +mZ2pfxxyyxxyyxxyyxxyyxxyyxxyyxx search google.com for the string "Hello World", return only pages written in Italian, return 500 URLs, write output to file res.txt, specify your personal key. |