From 0fc5cb02b804cee4ddd7ae124202f93706e5242d Mon Sep 17 00:00:00 2001 From: phette23 Date: Mon, 12 Jun 2023 15:32:13 -0700 Subject: [PATCH] make httpx follow redirects lead to a lot more errors since initial 3XX responses can turn into 4XX or 5XX after a redirect --- linkcheck.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linkcheck.py b/linkcheck.py index 996d4be..578a767 100644 --- a/linkcheck.py +++ b/linkcheck.py @@ -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