From cd1c0f677d710582d5af963c2091ee5c4aa99c43 Mon Sep 17 00:00:00 2001 From: Thanos <111999343+Sachaa-Thanasius@users.noreply.github.com> Date: Tue, 16 Apr 2024 17:52:59 -0400 Subject: [PATCH] Fix bug with chapter title's not showing up. --- exts/story_search.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exts/story_search.py b/exts/story_search.py index a1d8a60..f896535 100644 --- a/exts/story_search.py +++ b/exts/story_search.py @@ -82,7 +82,7 @@ def find_keywords_in_ao3_text( for chapter_div in element.findall(".//div[@id='chapters']/div[@class='userstuff']"): for elder_sibling in chapter_div.itersiblings("div", preceding=True): if elder_sibling.get("class") == "meta group": - if (chapter_title_el := chapter_div.find(".//h2[@class='heading']")) is not None: + if (chapter_title_el := elder_sibling.find(".//h2[@class='heading']")) is not None: chapter_title = chapter_title_el.text_content() else: chapter_title = ""