📜  在请求 python 代码示例中处理 404

📅  最后修改于: 2022-03-11 14:46:48.897000             🧑  作者: Mango

代码示例1
>>> # Here's what you should do if you want the status_code of a request.
>>> import requests
>>> r = requests.get('http://httpbin.org/status/404')
>>> r.status_code
404