我尝试了很长时间的不同方法来使用 python 请求向表单提交 POST 请求,但没有运气。我正在尝试发送'3513'到具有名称的表单文本字段TextTrnNo,然后从网站获取信息。
我失败的方法之一:
import requests
payload = {'TextTrnNo': '3513'}
r = requests.post('https://appiris.infofer.ro/mytrainro.aspx', data=payload)
print(r.text)
来自谷歌浏览器的标题:
Request URL: https://appiris.infofer.ro/ScriptResource.axd?d=JNg0fH_zydENJ7nFcOtvc6yqY25aZ8vD-Ng7zdFvgOejMomgDzr5SQOfJxd86HrHIAnJdwgVKGKwlCLMquTcg919u2vCLYJz5V0xHnmOduOfc5VgeUHRZPW3jweNO1vqw9JZLWTSVL3z295y_EUsB350MMAhbUa41ssYQzHWget11mAeRCd_ANONdJnWqlOV0&t=5854e822
Request Method: GET
Status Code: 200 (from memory cache)
Remote Address: 193.230.156.188:443
Referrer Policy: no-referrer-when-downgrade
cache-control: public
content-encoding: gzip
content-length: 55951
content-type: application/x-javascript
date: Sun, 13 Jan 2019 17:04:19 GMT
expires: Sun, 12 Jan 2020 22:49:44 GMT
last-modified: Sat, 12 Jan 2019 22:49:44 GMT
server: Microsoft-IIS/6.0
status: 200
x-powered-by: ASP.NET
Provisional headers are shown
d: JNg0fH_zydENJ7nFcOtvc6yqY25aZ8vD-Ng7zdFvgOejMomgDzr5SQOfJxd86HrHIAnJdwgVKGKwlCLMquTcg919u2vCLYJz5V0xHnmOduOfc5VgeUHRZPW3jweNO1vqw9JZLWTSVL3z295y_EUsB350MMAhbUa41ssYQzHWget11mAeRCd_ANONdJnWqlOV0
t: 5854e822
慕盖茨4494581
相关分类