python3 requestsGET请求传参

GET方式传参方式一:

import requests

url = 'http://www.baidu.com/s?page=2'  # 使用?携带参数
r = requests.get(url)
print(r.url)

GET方式传参方式二:

import requests
url = 'http://www.baidu.com/s'
data= {'page': ''} #将携带的参数传给params
r = requests.get(url, params=data)
print(r.url)
上一篇:win10 + VS2015 + 64位OSG3.4.0


下一篇:iOS隐藏状态栏