about urllib.encode & urlopen(url,data,timeout) function

about urllib.encode & urlopen(url,data,timeout) function

the data argument is form like belows:

a=1&b=2

this character is use urllib.urlencode concat together

use a dict

e.g.

dict={}

dict["a"]=1

dict["b"]=2

data=urllib.urlencode(dict)

 

if you already has a form like a=1&b=2

then your did not use the urllib.urlcode function

i was made a mistake when google some blog same how to use urllib2.urlopen() follow the urllib.urlencode way

in fact my data is alreay the well format

posted on 2012-12-17 10:32  lexus 阅读( ...) 评论( ...) 编辑 收藏

转载于:https://www.cnblogs.com/lexus/archive/2012/12/17/2821317.html

你可能感兴趣的:(about urllib.encode & urlopen(url,data,timeout) function)