By using python, how can I check if a website is up? From what I read, I need to check the "HTTP HEAD" and see status code "200 OK", but how to do so ?>
You may use requests library to find if website is up i.e. status code as 200
requests
status code
200
import requests url = "https://www.google.com" page = requests.get(url) print (page.status_code) >> 200