For a dead-simple way, why not use `curl` via `os.system`? Not pure Python, but gets the job done:
```python
import os
status = os.system("curl -s -o /dev/null -w '%{http_code}' example.com")
print("Site is up!" if status == 200 else "Something's wrong.")
```
Not elegant, but works in a pinch. For periodic checks, cron is your friend.
```python
import os
status = os.system("curl -s -o /dev/null -w '%{http_code}' example.com")
print("Site is up!" if status == 200 else "Something's wrong.")
```
Not elegant, but works in a pinch. For periodic checks, cron is your friend.
