mirror of
https://github.com/JimmXinu/FanFicFare.git
synced 2025-12-06 08:52:55 +01:00
adapter_fictionlive: create self.chapter_id_to_api earlier for normalize_chapterurl
This commit is contained in:
parent
9bb7b54023
commit
818e990184
1 changed files with 2 additions and 2 deletions
|
|
@ -55,6 +55,8 @@ class FictionLiveAdapter(BaseSiteAdapter):
|
||||||
self.story_id = self.parsedUrl.path.split('/')[3]
|
self.story_id = self.parsedUrl.path.split('/')[3]
|
||||||
self.story.setMetadata('storyId', self.story_id)
|
self.story.setMetadata('storyId', self.story_id)
|
||||||
|
|
||||||
|
self.chapter_id_to_api = {}
|
||||||
|
|
||||||
# normalize URL. omits title in the url
|
# normalize URL. omits title in the url
|
||||||
self._setURL("https://fiction.live/stories//{s_id}".format(s_id = self.story_id));
|
self._setURL("https://fiction.live/stories//{s_id}".format(s_id = self.story_id));
|
||||||
|
|
||||||
|
|
@ -222,8 +224,6 @@ class FictionLiveAdapter(BaseSiteAdapter):
|
||||||
## api url to get content of a multi route chapter. requires only the route id and no timestamps
|
## api url to get content of a multi route chapter. requires only the route id and no timestamps
|
||||||
route_chunkrange_url = "https://fiction.live/api/anonkun/route/{c_id}/chapters"
|
route_chunkrange_url = "https://fiction.live/api/anonkun/route/{c_id}/chapters"
|
||||||
|
|
||||||
self.chapter_id_to_api = {}
|
|
||||||
|
|
||||||
def add_chapter_url(title, bounds):
|
def add_chapter_url(title, bounds):
|
||||||
"Adds a chapter url based on the start/end chunk-range timestamps."
|
"Adds a chapter url based on the start/end chunk-range timestamps."
|
||||||
start, end = bounds
|
start, end = bounds
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue