467,858 Members | 1,704 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 467,858 developers. It's quick & easy.

urllib: cannot open webpage which requires authentication

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.

Oct 27 '07 #1
  • viewed: 1096
Share:

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

4 posts views Thread by Gary Feldman | last post: by
3 posts views Thread by Volker M. | last post: by
reply views Thread by Pieter Edelman | last post: by
3 posts views Thread by Chris Tavares | last post: by
11 posts views Thread by Johnny Lee | last post: by
4 posts views Thread by william | last post: by
reply views Thread by Ali.Sabil | last post: by
4 posts views Thread by kgrafals | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.