The script receives a list of URLs from text file and checks them up for 2 points:
- the server responds for request by status 200
- domain name is paid for a month or longer
Example of script launch on Linux, Python 3.5:
$ python3 check_sites_health.py <filename>
where 'filename' is the file with URLs list for testing.
Note, the script needs additional python modules to work. It would be installed by command:
$ pip3 install -r requirements.txt
$ python3 check_sites_health.py url_list
https://pythonworld.ru:
request HTTP 200: True,
Domain Name paid for 1 month and more: True
https://habrahabr.ru:
request HTTP 200: True,
Domain Name paid for 1 month and more: True
http://naturaliste.ru:
request HTTP 200: True,
Domain Name paid for 1 month and more: True
The code is written for educational purposes. Training course for web-developers - DEVMAN.org