Skip to content
This repository has been archived by the owner on Jun 20, 2024. It is now read-only.

Commit

Permalink
make httpx follow redirects
Browse files Browse the repository at this point in the history
lead to a lot more errors since initial 3XX responses can turn into 4XX or 5XX after a redirect
  • Loading branch information
phette23 committed Jun 12, 2023
1 parent 0147b73 commit 0fc5cb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion linkcheck.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def quote(list):
urls = urls.split(' | ')
for url in urls:
try:
r = httpx.get(url)
r = httpx.get(url, follow_redirects=True)
status = r.status_code
if not sums.get(status): sums[status] = 0
sums[status] += 1
Expand Down

0 comments on commit 0fc5cb0

Please sign in to comment.