Skip to content

Commit 84009e2

Browse files
committed
skip 429 http error in the check link script
1 parent 214eb2a commit 84009e2

File tree

1 file changed

+10
-5
lines changed

1 file changed

+10
-5
lines changed

scripts/check-broken-links-md.py

Lines changed: 10 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -37,11 +37,16 @@ def process_log() -> None:
3737
for line in log_err.splitlines():
3838
line = line.strip() # noqa: PLW2901
3939
# Check if the line starts with '('
40-
if line.startswith("("):
41-
# Extract the URL using regex
42-
for exception_url in exception_urls:
43-
if exception_url not in line:
44-
flagged_errors.append(line)
40+
if not line.startswith("("):
41+
continue
42+
43+
if line.endswith("429)"):
44+
# Too Many Requests http error
45+
continue
46+
# Extract the URL using regex
47+
for exception_url in exception_urls:
48+
if exception_url not in line:
49+
flagged_errors.append(line)
4550

4651
# Print flagged errors
4752
if not flagged_errors:

0 commit comments

Comments
 (0)