WebSearch1p
A web-searching application demonstrating www::search
Usage
WebSearch [-m
MaxCount]
[-e
SearchEngine]
[-o
option]
[-o
option ...]
[-ardvV]
query
Overview
This program is provides a command-line interface to web search engines, listing all URLs found for a given query. This program also provides a simple demonstration of the WWW::Search Perl library for web searches.
The program supports a number of search engines; use WebSearch --list to see which backends are installed.
A more sophisticated client is AutoSearch which maintains a change list of found objects.
For examples and hints about searches, see AutoSearch.
Options
WebSearch uses Getopt::Long, so you can use double-minus with long option names, or single-minus with one-letter abbreviations.
-
--engine e_name, -e e_name -
The string e_name is the name of (the module for) the desired search engine. Capitalization matters. See `perldoc WWW::Search` to find out what the default is (probably Null).
Use --list to get a list of installed backends.
-
--gui, -g -
Perform the search to mimic the default browser-based search. Not implemented for all backends, see the documentation for each backend.
-
--list -
Prints to STDERR a \n-separated list of installed backends.
-
--max max_count, -m max_count -
Specify the maximum number of hits to retrieve.
-
--option o_string, -o o_string -
Specify a search-engine option in the form 'key=value' (or just 'key'). Can be repeated for as many options are needed. Keys can be repeated.
-
--count, -c -
As the first line of output, print the approximate hit count. As the last line of output, print the actual hit count.
-
--terse, -t -
Do not print any URLs. Only useful if you also specify --count. If you specify --terse but not --count, there will be no output no matter how many hits are found!
-
--all, -a -
For each hit result, print all the URLs that the search engine indicated were equivalent to it. (Some URLs may refer to the same object.) Can be combined with --verbose; can not be combined with --raw.
-
--raw, -r -
For each hit result, print the raw HTML. Not implemented for all backends.
-
--verbose, -v -
Verbose mode. Enumerate the returned URLs and show the description, score, date, etc. for each.
-
--VERSION, -V -
Print version information and exit immediately.
-
--debug <i>, -d <i> -
Display back-end debugging information (with debug level <i>)
-
--host <hostname.sub.domain> -
Set the _host option for the WWW::Search object (backend-dependent).
-
--port <i> -
Set the _port option for the WWW::Search object (backend-dependent).
-
--username <bbunny> -
Set the username with which to login to the backend.
-
--password <c4rr0t5> -
Set the password with which to login to the backend.
-
--lwpdebug, -l -
Display low-level libwww-perl debugging information
Environment
The environment variable http_proxy (or HTTP_PROXY) specifies a proxy, if any.
Releases
13 releases since Debian 2.2 (Potato); the text changed 8 times.
--VERSION since Debian 3.1 (Sarge);
--all since Debian 3.1 (Sarge);
--count since Debian 3.1 (Sarge);
--debug since Debian 3.1 (Sarge);
--engine since Debian 3.1 (Sarge);
--gui since Debian 3.1 (Sarge);
--host since Debian 3.1 (Sarge);
--list since Debian 3.1 (Sarge);
--lwpdebug since Debian 3.1 (Sarge);
--max since Debian 3.1 (Sarge);
--option since Debian 3.1 (Sarge);
--password since Debian 3.1 (Sarge);
--port since Debian 3.1 (Sarge);
--raw since Debian 3.1 (Sarge);
--terse since Debian 3.1 (Sarge);
--username since Debian 3.1 (Sarge);
--verbose since Debian 3.1 (Sarge);
-V since Debian 3.1 (Sarge);
-a since Debian 3.1 (Sarge);
-c since Debian 3.1 (Sarge);
-d since Debian 3.1 (Sarge);
-e since Debian 3.1 (Sarge);
-g since Debian 3.1 (Sarge);
-l since Debian 3.1 (Sarge);
-m since Debian 3.1 (Sarge);
-o since Debian 3.1 (Sarge);
-r since Debian 3.1 (Sarge);
-t since Debian 3.1 (Sarge);
-v since Debian 3.1 (Sarge).