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 ?
Cheers
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 ?
Cheers
You can use httplib
prints
Of course, only if
www.python.org
is up.You may use
requests
library to find if website is up i.e.status code
as200
Works on Python 3
Hi this class can do speed and up test for your web page with this class:
Here's my solution using PycURL and validators