bug-wget
[Top][All Lists]
Advanced

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

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


From: martin
Subject: [Bug-wget] How do I use wget to download pages or files that require login/password?
Date: Mon, 1 Mar 2010 09:54:35 +0200

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 -

Any ideas, how to construct a wget --post-data parameter when the
log-in form is as I described above?


WBR,
Martin




reply via email to

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