From 9e97a11c1ef26ee54060b6ef7e23052d26b54b4a Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Wed, 13 Nov 2019 21:11:18 -0800 Subject: status_forcelist is on session, not request --- python/sandcrawler/ia.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/sandcrawler/ia.py b/python/sandcrawler/ia.py index d1e376a..31ea84e 100644 --- a/python/sandcrawler/ia.py +++ b/python/sandcrawler/ia.py @@ -152,7 +152,7 @@ class SavePageNowClient: self.ia_secret_key = os.environ.get('IA_SECRET_KEY') self.v1endpoint = v1endpoint self.v2endpoint = v2endpoint - self.v1_session = requests_retry_session(retries=5, backoff_factor=3) + self.v1_session = requests_retry_session(retries=5, backoff_factor=3, status_forcelist=()) self.v1_session.headers.update({ 'User-Agent': 'Mozilla/5.0 sandcrawler.SavePageNowClient', }) @@ -169,7 +169,7 @@ class SavePageNowClient: error on non-success. """ try: - resp = self.v1_session.get(self.v1endpoint + url, status_forcelist=()) + resp = self.v1_session.get(self.v1endpoint + url) except requests.exceptions.RetryError as re: # could have been any number of issues... raise SavePageNowError(str(re)) -- cgit v1.2.3