python request get status code example
Example 1: python requests get proxy
import requests
proxies = { "http": "http://10.10.10.10:8000",
"https": "https://10.10.10.10:8000"
}
r = requests.get("http://toscrape.com", proxies=proxies)
Example 2: python print return code of requests
>>> import requests
>>> r = requests.get('http://httpbin.org/status/404')
>>> r.status_code
404