[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-wget] How do I use wget to download pages or files that require

From: Micah Cowan
Subject: Re: [Bug-wget] How do I use wget to download pages or files that require login/password?
Date: Mon, 01 Mar 2010 10:34:49 -0800
User-agent: Thunderbird (X11/20090817)

martin wrote:
> hello,
> I would like to download and show a source of an webpage in stdout,
> but this is a https page with authentication form, which requires
> logging in. This particular site, what I'm talking about, has similar
> log-in form:
> <FORM NAME=AUTH ACTION=https://login.domain.com/ METHOD=POST>
>       <TR><TD class="white">Username: </TD><TD><INPUT TYPE=TEXT 
> NAME=user></TD></TR>
>       <TR><TD class="white">Password: </TD><TD><INPUT TYPE=PASSWORD
> NAME=password></TD></TR>
> </FORM>
> It's bit different from the one in the addictivecode.org example ->
> http://wget.addictivecode.org/FrequentlyAskedQuestions#password-protected
> However, I tried to construct my wget command, but unfortunately
> unsuccessfully :/ As I understand, it should be something like this:
> wget -q --post-data='user=MY_USERNAME&password=MY_PASSWORD'
> --save-cookies=/tmp/my-cookies.txt https://login.domain.com/
> --no-check-certificate --keep-session-cookies -O -

It looks right to me. Perhaps there are some character in the username
or password that need to be percent-encoded?

Micah J. Cowan

reply via email to

[Prev in Thread] Current Thread [Next in Thread]