1
0
mirror of https://github.com/moparisthebest/wget synced 2024-07-03 16:38:41 -04:00

[svn] Explain how to get the cookie file from IE.

This commit is contained in:
hniksic 2001-12-11 00:15:11 -08:00
parent 1f1f302bb0
commit 5eb068a46a
2 changed files with 36 additions and 14 deletions

View File

@ -1,3 +1,9 @@
2001-12-11 Hrvoje Niksic <hniksic@arsdigita.com>
* wget.texi (HTTP Options): Explain how to make IE produce a
`cookies.txt'-compatible file.
Reported by Herold Heiko.
2001-12-11 Hrvoje Niksic <hniksic@arsdigita.com> 2001-12-11 Hrvoje Niksic <hniksic@arsdigita.com>
* texi2pod.pl.in: Handle @asis in table. * texi2pod.pl.in: Handle @asis in table.

View File

@ -876,9 +876,9 @@ use cookies; however, @emph{storing} cookies is not on by default.
@cindex loading cookies @cindex loading cookies
@cindex cookies, loading @cindex cookies, loading
@item --load-cookies @var{file} @item --load-cookies @var{file}
Load cookies from @var{file} before the first HTTP retrieval. The Load cookies from @var{file} before the first HTTP retrieval.
format of @var{file} is one used by Netscape and Mozilla, at least their @var{file} is a textual file in the format originally used by Netscape's
Unix version. @file{cookies.txt} file.
You will typically use this option when mirroring sites that require You will typically use this option when mirroring sites that require
that you be logged in to access some or all of their content. The login that you be logged in to access some or all of their content. The login
@ -891,19 +891,35 @@ Mirroring such a site requires Wget to send the same cookies your
browser sends when communicating with the site. This is achieved by browser sends when communicating with the site. This is achieved by
@samp{--load-cookies}---simply point Wget to the location of the @samp{--load-cookies}---simply point Wget to the location of the
@file{cookies.txt} file, and it will send the same cookies your browser @file{cookies.txt} file, and it will send the same cookies your browser
would send in the same situation. If you're using Netscape navigator, would send in the same situation. Different browsers keep textual
specify @samp{--load-cookies ~/.netscape/cookies.txt}. Mozilla keeps cookie files in different locations:
the cookies file somewhere under @file{~/.mozilla}, in the profile
directory, but it's also named @file{cookies.txt}, the full path usually
being @file{~/.mozilla/default/@var{some-weird-string}/cookies.txt}.
If you're using Wget under a non-Unix OS, or if you are using a @table @asis
different browser, @samp{--load-cookies} will not work. @item Netscape 4.x.
The cookies are in @file{~/.netscape/cookies.txt}.
In that case you can view the cookies using the cookie manager provided @item Mozilla and Netscape 6.x.
by your browser, and write down the name and value of the cookie needed Mozilla's cookie file is also named @file{cookies.txt}, located
for the site. Then you can bypass the ``official'' cookie code and somewhere under @file{~/.mozilla}, in the directory of your profile.
simply tell Wget to use that one cookie, like this: The full path usually ends up looking somewhat like
@file{~/.mozilla/default/@var{some-weird-string}/cookies.txt}.
@item Internet Explorer.
You can produce a cookie file Wget can use by using the File menu,
Import and Export, Export Cookies. This has been tested with Internet
Explorer 5; it is not guaranteed to work with earlier versions.
@item Other browsers.
If you are using a different browser to create your cookies,
@samp{--load-cookies} will only work if you can locate or produce a
cookie file in the Netscape format that Wget expects.
@end table
If you cannot use @samp{--load-cookies}, there might still be an
alternative. If your browser supports a ``cookie manager'', you can use
it to view the cookies used when accessing the site you're mirroring.
Write down the name and value of the cookie, and manually instruct Wget
to send those cookies, bypassing the ``official'' cookie support:
@example @example
wget --cookies=off --header "Cookie: @var{name}=@var{value}" wget --cookies=off --header "Cookie: @var{name}=@var{value}"