Skip to content

Commit

Permalink
Missed a call to _soup in ao3
Browse files Browse the repository at this point in the history
  • Loading branch information
kemayo committed Dec 24, 2024
1 parent 3fdbae5 commit 9a2b574
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sites/ao3.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def _extract_work(self, workid):
)

# 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
Expand Down
2 changes: 1 addition & 1 deletion sites/fanfictionnet.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ def _soup(self, url, *args, **kwargs):
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)
Expand Down

0 comments on commit 9a2b574

Please sign in to comment.