mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2026-05-08 12:36:11 +02:00
Abstract 'Back to index' in base_efiction for other languages.
This commit is contained in:
parent
53c8b69f1e
commit
16be4cbbe5
2 changed files with 9 additions and 1 deletions
|
|
@ -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')
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue