Skip to content

Commit

Permalink
🐛 FIX: 403 not logging bug
Browse files Browse the repository at this point in the history
  • Loading branch information
TechWiz-3 committed Jul 31, 2022
1 parent c7d3a7a commit df1f9d2
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/link.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ def scan_links(links, verbose=False):
except requests.exceptions.RequestException as err:
if "Max retries exceeded with url" in str(err):
print(f"Link connection failed, max retries reached: {link}")
bad_links.append((file, line, link))
else:
print(f"---> Connection error: {err}")
bad_links.append((file, line, link))
Expand All @@ -25,6 +26,7 @@ def scan_links(links, verbose=False):
else:
if status == 403:
print(f"--> Link validity unkwown with 403 Forbidden return code {req.status_code}")
warning_links.append((file, line, link))
elif status == 406:
print(f"--> Link validity unkwown with 406 Not Acceptable return code {req.status_code}")
warning_links.append((file, line, link))
Expand Down

0 comments on commit df1f9d2

Please sign in to comment.