Skip to content

Commit

Permalink
Update fake user agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicoretti committed Dec 10, 2024
1 parent 441f09e commit fe8616f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/links.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def check(url: str) -> Tuple[Optional[int], str]:
"""Checks if an url is still working (can be accessed)"""
try:
# User-Agent needs to be faked otherwise some webpages will deny access with a 403
req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/5.0"})
req = urllib.request.Request(url, headers={"User-Agent": "Mozilla/10.0"})
result = request.urlopen(req)
return result.code, f"{result.msg}"
except urllib.error.HTTPError as ex:
Expand Down

0 comments on commit fe8616f

Please sign in to comment.