urllib: cannot open webpage which requires authentication
gmguyx
gmguyx at gmail.com
Sat Oct 27 13:39:49 EDT 2007
I tried using urllib.urlopen to open a personalized webpage
(my.yahoo.com) but it doesn't work:
print urllib.urlopen(http://my.yahoo.com).read()
Instead of returning my.yahoo.com, it returns a page asking me to log
in.
So then I tried urllib.urlencode:
data = urllib.urlencode({'action': 'https://login.yahoo.com/config/
login?', 'login': <mylogin>, 'passwd': <mypassword>})
print urllib.urlopen(http://my.yahoo.com, data).read()
However, this doesn't work either. Is there a way to do this? Thanks
in advance.
More information about the Python-list
mailing list