Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
wwwanlingxiao
public-apis
Commits
ae7ac005
Unverified
Commit
ae7ac005
authored
Jan 15, 2022
by
Matheus Felipe
Browse files
Mapped network problem (DNS failure, connection refused, etc)
parent
a553dd59
Changes
1
Hide whitespace changes
Inline
Side-by-side
scripts/validate/links.py
View file @
ae7ac005
...
@@ -172,14 +172,18 @@ def check_if_link_is_working(link: str) -> Tuple[bool, str]:
...
@@ -172,14 +172,18 @@ def check_if_link_is_working(link: str) -> Tuple[bool, str]:
has_error
=
True
has_error
=
True
error_message
=
f
'ERR:CLT:
{
code
}
:
{
link
}
'
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
:
except
requests
.
exceptions
.
SSLError
as
error
:
has_error
=
True
has_error
=
True
error_message
=
f
'ERR:SSL:
{
error
}
:
{
link
}
'
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
:
except
requests
.
exceptions
.
TooManyRedirects
as
error
:
has_error
=
True
has_error
=
True
error_message
=
f
'ERR:TMR:
{
error
}
:
{
link
}
'
error_message
=
f
'ERR:TMR:
{
error
}
:
{
link
}
'
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment