本帖最后由 Cool_Breeze 于 2021-6-17 17:27 编辑
蓝色圈内数据怎么携带!
以下是本人代码![Python] 纯文本查看 复制代码 # -*- encoding = utf-8 -*-
import requests
import urllib.parse
header = {
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.212 Safari/537.36'
}
form_data = {
"FileNo" : "44078",
"Description": "",
"WriteDate" : "",
"WriteDate1" : "2021-6-17",
"WriteBy" : "",
"submit" : "++"
}
form_data = urllib.parse.urlencode(form_data).encode('gb2312')
res = requests.post('xxx.asp', data = form_data, headers=header)
print(res.cookies.values())
with open('test.html', 'wb') as f:
f.write(res.content)
|