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': '2'} #将携带的参数传给params r = requests.get(url, params=data) print(r.url)