发布时间:2019-06-28 11:53:23编辑:auto阅读(2090)
1、使用requests模块
import request
url='http://www.xxx.com/xxx'
data={'username':'zhangsan','password':'zhangsanpw'}
r=requests.post(url,data=data)
print r.text2、使用urllib2模块
import urllib2
import urllib
url='http://www.xxx.com/xxx'
data={'username':'zhangsan','password':'zhangsanpw'}
r = urllib2.Request(url,urllib.urlencode(data))
result = urllib2.urlopen(req)
print result.read()
上一篇: python之函数isinstance
下一篇: 史上最全 python常见面试题(一)
51127
50521
41140
37983
32448
29349
28221
23066
23033
21358
1395°
2087°
1742°
1669°
1959°
1744°
2416°
4074°
3952°
2825°