mirror of
https://github.com/public-apis/public-apis.git
synced 2025-05-10 07:36:47 +02:00
Fix links validation (#1421)
This commit is contained in:
parent
a3e9fa01ce
commit
e35769370c
2 changed files with 6 additions and 2 deletions
|
@ -34,7 +34,11 @@ def validate_links(links):
|
|||
except socket.error as socketerror:
|
||||
errors.append("SOC: {} : {}".format(socketerror, link))
|
||||
except Exception as e:
|
||||
errors.append("ERR: {} : {}".format(e, link))
|
||||
# Ignore some exceptions which are not actually errors.
|
||||
# The list below should be extended with other exceptions in the future if needed
|
||||
if ((-1 != str(e).find("Content purported to be compressed with gzip but failed to decompress.")) and
|
||||
(-1 != str(e).find("[SSL: CERTIFICATE_VERIFY_FAIL)ED] certificate verify failed (_ssl.c:852)"))) :
|
||||
errors.append("ERR: {} : {}".format(e, link))
|
||||
return errors
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue