簡體   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