Greg Underwood <[EMAIL PROTECTED]> writes:

> On Tuesday 27 January 2004 05:23 pm, Hrvoje Niksic wrote:
>> Greg Underwood <[EMAIL PROTECTED]> writes:
>> > I took a peek at my cookies while logging into the site in a regular
>> > browser.  It definitely adds a session cookie when I log in,
>>
>> I think your problem should be solvable with `--keep-session-cookies'.
>> The server will have no way of knowing that the two "sessions" are in
>> fact different.  For example:
>>
>> # "Browse" to the log in page to get a permanent cookie and the unique
>> # string.  (We keep session cookies just in case they get added too.)
>>
>> wget --keep-session-cookies --save-cookies login.txt LOGIN-PAGE-URL
>
>
> I tried that, and the logins.txt file was still empty.

That only means that the login page itself in fact does *not* send any
cookies, contrary to what I believed was the case.  But that is not
very important (I included it for completeness), the important part is
the cookie you get from the authorization URL you POST your data to.

Did you follow the other steps or did you stop at this one?  I'd be
interested to know if the other steps worked.

> Can you give me an example of a URL that uses sessions cookies so I
> can see what is supposed to be written into the login.txt file when
> I do this first step?

Sure.

$ wget --keep-session-cookie --save-cookies login.txt www.amazon.com
...
$ cat login.txt
# HTTP cookie file.
# Generated by Wget on 2004-01-29 13:44:19.
# Edit at your own risk.
 
.amazon.com     TRUE    /       FALSE   0       obidos_path_continue-shopping   
continue-shopping-url=/subst/home/home.html&continue-shopping-post-data=&continue-shopping-description=generic.gateway.default

Reply via email to