mirror of
https://github.com/public-apis/public-apis.git
synced 2025-05-10 07:36:47 +02:00
Mapped network problem (DNS failure, connection refused, etc)
This commit is contained in:
parent
a553dd5909
commit
ae7ac00586
1 changed files with 8 additions and 4 deletions
|
@ -172,14 +172,18 @@ def check_if_link_is_working(link: str) -> Tuple[bool, str]:
|
|||
has_error = True
|
||||
error_message = f'ERR:CLT: {code} : {link}'
|
||||
|
||||
except (TimeoutError, requests.exceptions.ConnectTimeout):
|
||||
has_error = True
|
||||
error_message = f'ERR:TMO: {link}'
|
||||
|
||||
except requests.exceptions.SSLError as error:
|
||||
has_error = True
|
||||
error_message = f'ERR:SSL: {error} : {link}'
|
||||
|
||||
except requests.exceptions.ConnectionError as error:
|
||||
has_error = True
|
||||
error_message = f'ERR:CNT: {error} : {link}'
|
||||
|
||||
except (TimeoutError, requests.exceptions.ConnectTimeout):
|
||||
has_error = True
|
||||
error_message = f'ERR:TMO: {link}'
|
||||
|
||||
except requests.exceptions.TooManyRedirects as error:
|
||||
has_error = True
|
||||
error_message = f'ERR:TMR: {error} : {link}'
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue