webreaper -- download a web page and its links
webreaper [OPTIONS] URL
THIS IS ALPHA SOFTWARE
The webreaper program downloads web sites. It creates a directory, named after the host of the URL given on the command line, in the current working directory, and will optionally create a tarball of it.
This script has many features to make it look like a normal, interaction web browser. You can set values for some features, or use the defaults, enumerated later.
Set the referer [sic] string. Some sites limit what you can see based on how they think you got to the address (i.e. they want you to click on a certain link). The script automatically sets the referer strings for links it finds in web pages, but you can set the referer for the first link (the one you specify on the command line) with the -r switch.
For websites that use a login and password, use the -u and -p switches. This feature is still a bit broken because it sends the authorization string for every address.
Watch the action by turning on verbose messages with the -v switch. If you run this script from another script, cron, or some other automated method, you probably want no output, so do not use -v. You can also set the WEBREAPER_VERBOSE environment variable.
To get even more output, use the -d switch to turn on debugging output. You can also set the WEBREAPER_DEBUG varaible.
You can create a single file of everything that you download by creating an archive with the -t switch, which creates a tarball.
The script limits its traversal to URLs below the starting URL. This may change in the future.
set the user agent string
list of file extensions to store (not yet implemented)
list of file extensions to skip (not yet implemented)
turn on debugging output
use this directory for downloads
store all files in the same directory (flat)
allowed hosts, comma separated.
stop after requesting NUMBER resources, whether or not webreaper stored them
stop after storing NUMBER resources
referer for the first URL
password for basic auth
sleep between requests
create tar archive
username for basic auth
create a zip archive
webreaper -s 10 http://www.example.com
webreaper -t http://www.example.com
webreaper -z http://www.example.com
webreaper -t -z http://www.example.com
webreaper -a "Mozilla 19.2 (Sony PlayStation)" http://www.example.com
webreaper -N 5 -n 10 http://www.example.com
Show debugging output (implies verbose output). This is the same as the -d switch.
Show progress information. This is the same as the -v switch.
Store downloads in this directory. Script uses the current working directory if this directory does not exist. This is the same as the -D switch.
lwp-rget (comes with LWP)
This source is part of a SourceForge project which always has the latest sources in CVS, as well as all of the previous releases.
If, for some reason, I disappear from the world, one of the other members of the project can shepherd this module appropriately.
brian d foy, <firstname.lastname@example.org>
Copyright 2003-4, brian d foy, All rights reserved.
You may use this program under the same terms as Perl itself.