How to handle exceptions with python library requests? For example how to check is PC connected to internet?
When I try
try: requests.get(\'http
for clarity, that is
except requests.ConnectionError:
NOT
import requests.ConnectionError
You can also catch a general exception (although this isn't recommended) with
except Exception: