mirror of
https://github.com/minetest/contentdb.git
synced 2024-12-22 22:12:24 +01:00
Link Checker: Allow 403 status codes
Cloudflare likes to break the Internet, so we'll have to ignore 403 errors from sites in the link checker.
This commit is contained in:
parent
5b1417f432
commit
837d0b5bc1
@ -117,6 +117,9 @@ def _url_exists(url: str) -> str:
|
|||||||
response.raise_for_status()
|
response.raise_for_status()
|
||||||
return ""
|
return ""
|
||||||
except requests.exceptions.HTTPError as e:
|
except requests.exceptions.HTTPError as e:
|
||||||
|
if e.response.status_code == 403:
|
||||||
|
return ""
|
||||||
|
|
||||||
print(f" - [{e.response.status_code}] <{url}>", file=sys.stderr)
|
print(f" - [{e.response.status_code}] <{url}>", file=sys.stderr)
|
||||||
return str(e.response.status_code)
|
return str(e.response.status_code)
|
||||||
except requests.exceptions.ConnectionError:
|
except requests.exceptions.ConnectionError:
|
||||||
|
Loading…
Reference in New Issue
Block a user