Skip to content

Commit

Permalink
Add total User-Agent (public-apis#2551)
Browse files Browse the repository at this point in the history
  • Loading branch information
codewithpom authored Oct 25, 2021
1 parent 1853ded commit b5932d0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions build/validate_links.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,9 @@ def validate_links(links):
if host[:3] == 'www':
host = host[4:]

resp = h.request(link, headers={
resp = h.request(link + "/", headers={
# Faking user agent as some hosting services block not-whitelisted UA
'user-agent': 'Mozilla/5.0',
'User-Agent': 'Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1467.0 Safari/537.36',
# setting host because Cloudflare returns 403 asking for captcha if host is missing
'host': host
})
Expand Down

0 comments on commit b5932d0

Please sign in to comment.