![](/img/trans.png)
[英]What's the difference between HTTPX and requests module in python that is causing this error
[英]python requests module: what's the difference between head and get request method
當我使用請求模塊檢查頁面是否可用時。 例如:
>>> import requests
>>> url = "http://www.motie.com/book/29675"
>>> res = requests.head(url)
>>> print res.status_code
404
>>> res = requests.get(url)
>>> print res.status_code
200
我分別獲得HEAD和GET的status_code 404和200。 我不知道為什么。 此外,我該如何尋找原因。 非常感謝。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.