if you want to hardcode the password in the url. What you need to do is <a href="mailto:http:username:password@www.passwordprotectedsite.com">http:username:password@www.passwordprotectedsite.com</a><br><br><div><span class="gmail_quote">
On 10/14/07, <b class="gmail_sendername">Diez B. Roggisch</b> <<a href="mailto:deets@nospam.web.de">deets@nospam.web.de</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
rodrigo schrieb:<br>> I am trying to retrieve a password protected page using:<br>><br>> get = urllib.urlopen('<a href="http://password.protected.url">http://password.protected.url</a>"').read()<br>>
<br>> While doing this interactively, I'm asked for  the username, then the<br>> password at the terminal.<br>> Is there any way to do this non-interactively? To hardcode the user/<br>> pass into the script so I can get the page automatically?
<br>><br>> (This is not a cracking attempt, I am trying to retrieve a page I have<br>> legitimate access to, just doing it automatically when certain<br>> conditions are met.)<br><br>Is that HTTP-auth? Then this might help:
<br><br><a href="http://www.voidspace.org.uk/python/articles/authentication.shtml">http://www.voidspace.org.uk/python/articles/authentication.shtml</a><br><br>BTW, use urllib2.<br><br>Diez<br>--<br><a href="http://mail.python.org/mailman/listinfo/python-list">
http://mail.python.org/mailman/listinfo/python-list</a><br></blockquote></div><br><br clear="all"><br>-- <br><a href="http://www.goldwatches.com/">http://www.goldwatches.com/</a><br><a href="http://www.jewelerslounge.com">
http://www.jewelerslounge.com</a>