1LWP-RGET(1)           User Contributed Perl Documentation          LWP-RGET(1)
2
3
4

NAME

6       lwp-rget - Retrieve web documents recursively
7

SYNOPSIS

9        lwp-rget [--verbose] [--auth=USER:PASS] [--depth=N] [--hier] [--iis]
10                 [--keepext=mime/type[,mime/type]] [--limit=N] [--nospace]
11                 [--prefix=URL] [--referer=URL] [--sleep=N] [--tolower] <URL>
12        lwp-rget --version
13

DESCRIPTION

15       This program will retrieve a document and store it in a local file.  It
16       will follow any links found in the document and store these documents
17       as well, patching links so that they refer to these local copies.  This
18       process continues until there are no more unvisited links or the
19       process is stopped by the one or more of the limits which can be con‐
20       trolled by the command line arguments.
21
22       This program is useful if you want to make a local copy of a collection
23       of documents or want to do web reading off-line.
24
25       All documents are stored as plain files in the current directory. The
26       file names chosen are derived from the last component of URL paths.
27
28       The options are:
29
30       --auth=USER:PASn
31          Set the authentication credentials to user "USER" and password
32          "PASS" if any restricted parts of the web site are hit.  If there
33          are restricted parts of the web site and authentication credentials
34          are not available, those pages will not be downloaded.
35
36       --depth=n
37          Limit the recursive level. Embedded images are always loaded, even
38          if they fall outside the --depth. This means that one can use
39          --depth=0 in order to fetch a single document together with all
40          inline graphics.
41
42          The default depth is 5.
43
44       --hier
45          Download files into a hierarchy that mimics the web site structure.
46          The default is to put all files in the current directory.
47
48       --referer=URI
49          Set the value of the Referer header for the initial request.  The
50          special value "NONE" can be used to suppress the Referer header in
51          any of subsequent requests.  The Referer header will always be sup‐
52          pressed in all normal "http" requests if the referring page was
53          transmitted over "https" as recommended in RFC 2616.
54
55       --iis
56          Sends an "Accept: */*" on all URL requests as a workaround for a bug
57          in IIS 2.0.  If no Accept MIME header is present, IIS 2.0 returns
58          with a "406 No acceptable objects were found" error.  Also converts
59          any back slashes (\\) in URLs to forward slashes (/).
60
61       --keepext=mime/type[,mime/type]
62          Keeps the current extension for the list MIME types.  Useful when
63          downloading text/plain documents that shouldn't all be translated to
64          *.txt files.
65
66       --limit=n
67          Limit the number of documents to get.  The default limit is 50.
68
69       --nospace
70          Changes spaces in all URLs to underscore characters (_).  Useful
71          when downloading files from sites serving URLs with spaces in
72          them.   Does not remove spaces from fragments, e.g.,
73          "file.html#somewhere in here".
74
75       --prefix=url_prefix
76          Limit the links to follow. Only URLs that start the prefix string
77          are followed.
78
79          The default prefix is set as the "directory" of the initial URL to
80          follow.    For instance if we start lwp-rget with the URL
81          "http://www.sn.no/foo/bar.html", then prefix will be set to
82          "http://www.sn.no/foo/".
83
84          Use "--prefix=''" if you don't want the fetching to be limited by
85          any prefix.
86
87       --sleep=n
88          Sleep n seconds before retrieving each document. This options allows
89          you to go slowly, not loading the server you visiting too much.
90
91       --tolower
92          Translates all links to lowercase.  Useful when downloading files
93          from IIS since it does not serve files in a case sensitive manner.
94
95       --verbose
96          Make more noise while running.
97
98       --quiet
99          Don't make any noise.
100
101       --version
102          Print program version number and quit.
103
104       --help
105          Print the usage message and quit.
106
107       Before the program exits the name of the file, where the initial URL is
108       stored, is printed on stdout.  All used filenames are also printed on
109       stderr as they are loaded.  This printing can be suppressed with the
110       --quiet option.
111

SEE ALSO

113       lwp-request, LWP
114

AUTHOR

116       Gisle Aas <aas@sn.no>
117
118
119
120perl v5.8.8                       2006-07-12                       LWP-RGET(1)
Impressum