From 818e990184e178f11da53657c3031ce12d68e6b7 Mon Sep 17 00:00:00 2001 From: Jim Miller Date: Thu, 4 Dec 2025 14:04:24 -0600 Subject: [PATCH] adapter_fictionlive: create self.chapter_id_to_api earlier for normalize_chapterurl --- fanficfare/adapters/adapter_fictionlive.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/fanficfare/adapters/adapter_fictionlive.py b/fanficfare/adapters/adapter_fictionlive.py index aabfc02d..1443d8fc 100644 --- a/fanficfare/adapters/adapter_fictionlive.py +++ b/fanficfare/adapters/adapter_fictionlive.py @@ -55,6 +55,8 @@ class FictionLiveAdapter(BaseSiteAdapter): self.story_id = self.parsedUrl.path.split('/')[3] self.story.setMetadata('storyId', self.story_id) + self.chapter_id_to_api = {} + # normalize URL. omits title in the url 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 route_chunkrange_url = "https://fiction.live/api/anonkun/route/{c_id}/chapters" - self.chapter_id_to_api = {} - def add_chapter_url(title, bounds): "Adds a chapter url based on the start/end chunk-range timestamps." start, end = bounds