【发布时间】:2023-03-05 21:26:01
【问题描述】:
下面的链接给出了基于特定条件的股票扫描列表
https://chartink.com/screener/mwdbscans
我可以看到下面是我应该用于 POST 请求的 url
https://chartink.com/screener/process
当我想发送 POST 请求以在 python 中获取列表时,我遇到了问题 从开发人员工具中,我可以看到请求标头和表单数据,但是当我对数据进行编码并发送 POST 请求时,我收到错误 500(内部服务器错误)
我尝试的 POST 请求的数据体是,
Host: chartink.com
User-Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0)
Gecko/20100101 Firefox/61.0
Accept: application/json, text/javascript, */*; q=0.01
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate, br
Referer: https://chartink.com/screener/nsk-ohl-long
Content-Type: application/x-www-form-urlencoded; charset=UTF-8
X-CSRF-TOKEN: PsJC0BUBkL7gE8YyglD6uYU8TpjqXLvN3whpdM9v
X-Requested-With: XMLHttpRequest
Content-Length: 179
Cookie: _ga=GA1.2.1391629072.1532845865; XSRF-
Connection: keep-alive
【问题讨论】:
-
你能把你尝试的数据放在这里吗,请提及服务器端期望的数据类型
-
chartink.com/screener/nsk-ohl-long 请打开此链接。以上 POST 请求需要根据条件扫描的股票列表以及下载 Excel 表的链接