Need a simple code to check a website in Python – any suggestions? or What’s the best way to write co

16 Replies, 1770 Views

If you’re lazy (like me), just use `ping3` for a quick uptime check:

```python
from ping3 import ping

if ping("example.com"):
print("Site’s up!")
else:
print("RIP site.")
```

Not HTTP status codes, but dead simple for "is it alive?" checks.

Messages In This Thread



Users browsing this thread: 1 Guest(s)