mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 15:39:43 +00:00
fix check links
This commit is contained in:
@@ -30,7 +30,10 @@ VALID_RET = [
|
||||
302,
|
||||
]
|
||||
IGNORES = [
|
||||
'badgen.net',
|
||||
'badgen.net',
|
||||
]
|
||||
OK_WHEN_FORBIDDEN = [
|
||||
'linux.die.net'
|
||||
]
|
||||
IGNORE_GENERIC = []
|
||||
USER_AGENT = (
|
||||
@@ -103,6 +106,9 @@ def check_links(urls):
|
||||
# pylint: disable=W0703
|
||||
except Exception:
|
||||
ret = 404
|
||||
if ret == 403 and hostname in OK_WHEN_FORBIDDEN:
|
||||
print(f' [{GREEN}OK-although-{ret}{RESET}] {MAGENTA}{url}{RESET}')
|
||||
continue
|
||||
if ret not in VALID_RET:
|
||||
msg = (
|
||||
f' {YELLOW}[WARN]{RESET} HEAD {url} returned {ret}'
|
||||
|
||||
Reference in New Issue
Block a user