response 404 requests python compare

The solution for “response 404 requests python compare” can be found here. The following code will assist you in solving the problem.

Look at the r.status_code attribute:

if r.status_code == 404:
# A 404 was issued.


>>> import requests
>>> r = requests.get(‘’)
>>> r.status_code

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

inline scripts encapsulated in