1
0
Fork 0
mirror of https://github.com/kemayo/leech synced 2025-12-06 08:22:56 +01:00

Missed a call to _soup in ao3

This commit is contained in:
David Lynch 2024-12-23 21:02:09 -06:00
parent 3fdbae5851
commit 9a2b574b4b
2 changed files with 2 additions and 2 deletions

View file

@ -60,7 +60,7 @@ class ArchiveOfOurOwn(Site):
) )
# Fetch the chapter list as well because it contains info that's not in the full work # 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') chapters = soup.select('#chapters > div')
if len(chapters) == 1: if len(chapters) == 1:
# in a single-chapter story the #chapters div is actually the chapter # in a single-chapter story the #chapters div is actually the chapter

View file

@ -107,7 +107,7 @@ class FanFictionNet(Site):
self.session.cache.delete_url(fallback) 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) 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: try:
super()._soup(self, url, *args, **kwargs) return super()._soup(self, url, *args, **kwargs)
except CloudflareException: except CloudflareException:
self._cloudflared = True self._cloudflared = True
return self._soup(url, *args, **kwargs) return self._soup(url, *args, **kwargs)