Skip to content

Commit

Permalink
Fix bug with chapter title's not showing up.
Browse files Browse the repository at this point in the history
  • Loading branch information
Sachaa-Thanasius committed Apr 16, 2024
1 parent 4d13d9a commit cd1c0f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion exts/story_search.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""
Expand Down

0 comments on commit cd1c0f6

Please sign in to comment.