Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #11394
| Date | 2011-08-14 17:03 +0200 |
|---|---|
| From | Rafael Durán Castañeda <rafadurancastaneda@gmail.com> |
| Subject | Re: login with urllib2 |
| References | <tencent_6DD52AA454BF5A964A9B1269@qq.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2273.1313334200.1164.python-list@python.org> (permalink) |
I'm not sure but you probably need using HTTPS handler, but without
exact error code/message...
On 14/08/11 16:50, 守株待兔 wrote:
> please to see my code:
> import urllib
> import urllib2
>
> url = 'http://hi.baidu.com/'
> values = {'username' : '******','password' : '******' }
>
> data = urllib.urlencode(values)
> req = urllib2.Request(url,data)
> response = urllib2.urlopen(req)
> the_page = response.read()
>
> i can't to login ,why?username and password are right.
> any word appreciated.
Back to comp.lang.python | Previous | Next | Find similar | Unroll thread
Re: login with urllib2 Rafael Durán Castañeda <rafadurancastaneda@gmail.com> - 2011-08-14 17:03 +0200
csiph-web