diff options
author | Bryan Newbold <bnewbold@archive.org> | 2019-11-13 21:11:18 -0800 |
---|---|---|
committer | Bryan Newbold <bnewbold@archive.org> | 2019-11-13 21:11:18 -0800 |
commit | 9e97a11c1ef26ee54060b6ef7e23052d26b54b4a (patch) | |
tree | 3c45d0e8bc83d36be2504d5e890f91da9e767ed6 | |
parent | 53b2d766c39ab832ef65295a1c60f2324b30a53c (diff) | |
download | sandcrawler-9e97a11c1ef26ee54060b6ef7e23052d26b54b4a.tar.gz sandcrawler-9e97a11c1ef26ee54060b6ef7e23052d26b54b4a.zip |
status_forcelist is on session, not request
-rw-r--r-- | python/sandcrawler/ia.py | 4 |
1 files 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)) |