我試圖從使用requests
模塊的網站獲取http響應。我得到了我的響應狀態代碼410:處理某些http響應的python請求
<Response [410]>
從文檔,似乎對網頁內容的轉發URL可能不是故意提供給客戶。這確實是這種情況,還是我錯過了什麼?試圖確認所述網頁是否可以在全部報廢:
url='http://www.b2i.us/profiles/investor/ResLibraryView.asp?ResLibraryID=81517&GoTopage=3&Category=1836&BzID=1690&G=666'
try:
response = requests.get(url)
except requests.exceptions.RequestException as e:
print(e)