Web authentication
luigipaioro
luigipaioro at libero.it
Thu Dec 4 10:20:08 EST 2003
Good morning to all!
I'm trying to access on a web page that needs user and password
authentication. I'm enabled to access there (I mean that I have an
user name and a password to access via web), but I cannot access using
an automatic procedure (that is what I need to make a daemon that
downloads weekly an ASCII file from that site).
I've tried using urllib:
import urllib
conn = urlib.urlopen("http://user:password@www.mysite.com")
print conn.read()
But it doesn't work (it asks me again user and password).
Does anybody know how can I acces to my site with authentication?
I think that urllib2 can help me but I don't undestand how!!!
Thaks
Luigi
More information about the Python-list
mailing list