mirror of
https://github.com/FranP-code/public-apis.git
synced 2025-10-13 00:03:04 +00:00
Fix links validation (#1421)
This commit is contained in:
@@ -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__":
|
||||
|
||||
Reference in New Issue
Block a user