If you're looking for something lightweight, `urllib` works too, but `requests` is way cleaner IMO. Here's how you'd do it:
```python
from urllib.request import urlopen
from urllib.error import URLError
try:
urlopen("https://example.com", timeout=10)
print("Website is reachable.")
except URLError:
print("Website is down or unreachable.")
```
For scheduling, check out `schedule` library or just use cron jobs if you're on Linux.
```python
from urllib.request import urlopen
from urllib.error import URLError
try:
urlopen("https://example.com", timeout=10)
print("Website is reachable.")
except URLError:
print("Website is down or unreachable.")
```
For scheduling, check out `schedule` library or just use cron jobs if you're on Linux.
