Skip to content

Commit 1779b2d

Browse files
committed
ignore 403
1 parent a774781 commit 1779b2d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

check-urls.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,9 @@ def check_url(url):
4646
response = session.head(url, headers=headers, timeout=5, allow_redirects=True)
4747
if response.status_code in [202, 405]:
4848
response = session.get(url, headers=headers, timeout=5, allow_redirects=True)
49-
49+
if response.status_code == 403:
50+
print(f'403 (ignored): {url}')
51+
return None
5052
if response.status_code == 200:
5153
return None
5254
return f'{response.status_code}: {url}'

0 commit comments

Comments
 (0)