Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #11393 > unrolled thread

login with urllib2

Started by"守株待兔" <1248283536@qq.com>
First post2011-08-14 22:50 +0800
Last post2011-08-14 22:50 +0800
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python


Contents

  login  with urllib2 "守株待兔" <1248283536@qq.com> - 2011-08-14 22:50 +0800

#11393 — login with urllib2

From"守株待兔" <1248283536@qq.com>
Date2011-08-14 22:50 +0800
Subjectlogin with urllib2
Message-ID<mailman.2272.1313333426.1164.python-list@python.org>

[Multipart message — attachments visible in raw view] — view raw

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.

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web