The script monitors the sites for response the status code and an expiration date. It checks whether site is expiring in month, and whether http response status is 200.
To run the script python3.5 is required. Side packages are listed in requirements.txt. To install packages run the following command in shell:
$ pip install -r requirements.txtThe script takes one positional argument:
- path - the path to file, containing urls of sites for monitoring
http://github.com
https://theframeworks.com
https://google.com
$ python3 check_sites_health.py <txt_with_utls>
Checking http://www.github.com:
server respond with 200: True
Expiring in a month: False
Checking http://romangagarin.com
Server respond with 200: True
No expiry date for http://romangagarin.com
Checking http://theframeworks.com
Server respond with 200: True
Expiring in month: False
The code is written for educational purposes. Training course for web-developers - DEVMAN.org