Fix crash in Save Page Now, when run without mocks
This commit is contained in:
parent
9782ec22ec
commit
8139bf5410
|
@ -123,7 +123,9 @@ class Session:
|
|||
)
|
||||
|
||||
def _save_page_now(self, url: str) -> models.WebPageSnapshot:
|
||||
response = self._session.get(f"https://web.archive.org/save/{url}")
|
||||
response = self._session.get(
|
||||
f"https://web.archive.org/save/{url}", allow_redirects=False
|
||||
)
|
||||
response.raise_for_status() # TODO: retry
|
||||
wayback_url = response.headers["Location"]
|
||||
return self._fetch_wayback_snapshot(url, wayback_url)
|
||||
|
|
Loading…
Reference in New Issue