如何使用python库请求处理异常?例如,如何检查PC是否连接到互联网?
当我尝试
try: requests.get('http://www.google.com') except ConnectionError: # handle the exception
它给我的错误名称ConnectionError没有定义
ConnectionError
python exception http-request python-requests
exception ×1
http-request ×1
python ×1
python-requests ×1