diff --git a/fanficfare/adapters/adapter_merengohu.py b/fanficfare/adapters/adapter_merengohu.py index 67717f21..2f09cf24 100644 --- a/fanficfare/adapters/adapter_merengohu.py +++ b/fanficfare/adapters/adapter_merengohu.py @@ -37,6 +37,10 @@ class MerengoHuAdapter(BaseEfictionAdapter): def getDateFormat(self): return "%Y.%m.%d" + @classmethod + def getBacktoIndex(self): + return 'Vissza az indexhez' + def extractChapterUrlsAndMetadata(self): ## merengo.hu has a custom 18 consent click through self.get_request(self.getUrlForPhp('tizennyolc.php')+'?consent=true') diff --git a/fanficfare/adapters/base_efiction_adapter.py b/fanficfare/adapters/base_efiction_adapter.py index ed066d96..68bc295f 100644 --- a/fanficfare/adapters/base_efiction_adapter.py +++ b/fanficfare/adapters/base_efiction_adapter.py @@ -197,6 +197,10 @@ class BaseEfictionAdapter(BaseSiteAdapter): """ return _USERACCOUNT + @classmethod + def getBacktoIndex(self): + return 'Back to index' + ## Login seems to be reasonably standard across eFiction sites. @classmethod def needToLoginCheck(self, html): @@ -459,7 +463,7 @@ class BaseEfictionAdapter(BaseSiteAdapter): chapterId = m.group('chapterId') chapterLink = b.findNext("a") chapterLink['href'] = "%s&chapter=%s" % (self.url, chapterId) - if chapterLink.string !='Back to index': + if chapterLink.string != self.getBacktoIndex(): self.add_chapter(chapterLink.string, chapterLink['href']) ## Store reference to soup for getChapterText