How to get the HTTP status code after GET request from URL with requests library in Python

1 Answer

0 votes
# pip install -U requests

import requests

url = 'https://www.seek4info.com/'
r = requests.get(url)

print(r.status_code)


'''
run:
 
200

'''

 



answered Nov 18, 2018 by avibootz

Related questions

1 answer 213 views
1 answer 228 views
1 answer 200 views
...