mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-05 19:11:50 +02:00
Fix for newer BS4/soupsieve enforcing CSS selector rules about :/ chars.
This commit is contained in:
parent
3b3e951100
commit
a4127aee18
1 changed files with 4 additions and 2 deletions
|
|
@ -132,10 +132,12 @@ class FictionHuntComSiteAdapter(BaseSiteAdapter):
|
|||
|
||||
## find story url, might need to spin through author's pages.
|
||||
while authpagea and not authstorya:
|
||||
# logger.debug(authpagea)
|
||||
logger.debug(authpagea)
|
||||
authsoup = self.make_soup(self._fetchUrl(authpagea['href']))
|
||||
authpagea = authsoup.find('a',{'class':'page-link','rel':'next'})
|
||||
authstorya = authsoup.select('h4.Story__item-title a[href=%s]'%self.url)
|
||||
# CSS selectors don't allow : or / unquoted, which
|
||||
# BS4(and dependencies) didn't used to enforce.
|
||||
authstorya = authsoup.select('h4.Story__item-title a[href="%s"]'%self.url)
|
||||
|
||||
if not authstorya:
|
||||
raise exceptions.FailedToDownload("Error finding %s on author page(s)" % self.url)
|
||||
|
|
|
|||
Loading…
Reference in a new issue