繁体   English   中英

如何使用 python 绕过响应 503

[英]How to bypass response 503 with python

我正在尝试为我的作业抓取一些信息,但从https://www.klsescreener.com/v2/stocks/view/3182返回响应 503。

我正在使用的代码是

headers = {'User-Agent': 'Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/41.0.2228.0 Safari/537.36'}
page = requests.get('https://www.klsescreener.com/v2/stocks/view/'+stockcode[x],headers=headers)

有没有其他方法可以绕过响应 503?

Please do a curl request on the API in order to check if the API is functional or not, Keeping this in mind 503 is generally the error which means you're not getting anything from the respective URL.

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM