Trouble with urllib, auth and logging into Netgear RT314

Henning Sauer hsauer at marnie.teuto.de
Sun Jun 23 13:50:53 EDT 2002


Hello,

when I try to get a information from my Netgear RT 314 Router through
it's Webinterface with Python, I have to authenticate with user and
password. I do this with passing a URL like this:

result = urllib.urlopen("http://user:password@192.168.0.1")

With this I get prompted one the console for user and password. 
When I retry this immediately I don't get asked for user and password.
This problem seems to be specific to Python and the Netgear RT 314,
because when I try to connect with browser with the above URL it works,
and also when try another URL with user password URL from Python it also
works.
How can I solve this problem ?

Bye,
Henning




More information about the Python-list mailing list