From 9a2b574b4be39d31ce06544aea7eebf81429d73b Mon Sep 17 00:00:00 2001 From: David Lynch Date: Mon, 23 Dec 2024 21:02:09 -0600 Subject: [PATCH] Missed a call to _soup in ao3 --- sites/ao3.py | 2 +- sites/fanfictionnet.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/sites/ao3.py b/sites/ao3.py index 910e0ee..3da001a 100644 --- a/sites/ao3.py +++ b/sites/ao3.py @@ -60,7 +60,7 @@ class ArchiveOfOurOwn(Site): ) # Fetch the chapter list as well because it contains info that's not in the full work - nav_soup = self._soup(f'https://archiveofourown.org/works/{workid}/navigate') + nav_soup, nav_base = self._soup(f'https://archiveofourown.org/works/{workid}/navigate') chapters = soup.select('#chapters > div') if len(chapters) == 1: # in a single-chapter story the #chapters div is actually the chapter diff --git a/sites/fanfictionnet.py b/sites/fanfictionnet.py index 68fa6fc..c074fb5 100644 --- a/sites/fanfictionnet.py +++ b/sites/fanfictionnet.py @@ -107,7 +107,7 @@ class FanFictionNet(Site): self.session.cache.delete_url(fallback) raise CloudflareException("Couldn't fetch, presumably because of Cloudflare protection, and falling back to archive.org failed; if some chapters were succeeding, try again?", url, fallback) try: - super()._soup(self, url, *args, **kwargs) + return super()._soup(self, url, *args, **kwargs) except CloudflareException: self._cloudflared = True return self._soup(url, *args, **kwargs)