mirror of
https://github.com/public-apis/public-apis.git
synced 2025-05-01 19:27:03 +02:00
Update links validation user-agent (#1428)
This commit is contained in:
parent
17058fbcde
commit
dc38eb60b0
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ def validate_links(links):
|
|||
for link in links:
|
||||
h = httplib2.Http(disable_ssl_certificate_validation=True, timeout=25)
|
||||
try:
|
||||
resp = h.request(link, headers={'user-agent': 'python-httplib2/0.9.2'})
|
||||
resp = h.request(link, headers={'user-agent': 'python-httplib2/0.18.0'})
|
||||
code = int(resp[0]['status'])
|
||||
# check if status code is a client or server error
|
||||
if code >= 404:
|
||||
|
|
Loading…
Add table
Reference in a new issue