From 0d2a0c7311ae62bbd6c74ca1868696c83676fb9a Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Thu, 25 Jun 2020 11:46:32 -0700 Subject: small improvements to check URL script --- check_issn_urls.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/check_issn_urls.py b/check_issn_urls.py index 956c359..71593f5 100755 --- a/check_issn_urls.py +++ b/check_issn_urls.py @@ -70,7 +70,7 @@ def sniff_blocked(resp): block, etc. TODO: unimplemented """ - if resp.status_code in (403, 420): + if resp.status_code in (403, 420, 429): return True # JSTOR does this if ( @@ -123,7 +123,7 @@ def check_url(issnl, url): try: resp = requests.get( url, - timeout=30.0, + timeout=15.0, headers={ "User-Agent": "ia_bot/0.0 (python requests) journal-live-check; contact:info@archive.org" }, -- cgit v1.2.3