安装requests模块(cmd命令)
pip install requests
引入requests模块
import requests
headers = {"Cookie" :"pgv_pvi=6"}
url = 'https://mta.qq.com'
params = {'start_date':'2020-07-01'}
get_data = requests.get(url,headers=headers,params=params)
注意:request是内置库和requests库是两码事。
参考:
requests库之Cookie