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>
>       <TR><TD ALIGN=RIGHT><INPUT TYPE=SUBMIT VALUE="     OK  "></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
http://micah.cowan.name/


Reply via email to