From ced8b9a2d032e7e4956b331d4408cb4b0829c780 Mon Sep 17 00:00:00 2001 From: I-Al-Istannen Date: Sat, 8 Jan 2022 16:58:30 +0100 Subject: [PATCH] Fix some accordions --- PFERD/crawl/ilias/kit_ilias_html.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/PFERD/crawl/ilias/kit_ilias_html.py b/PFERD/crawl/ilias/kit_ilias_html.py index 9c8ab95..0a81222 100644 --- a/PFERD/crawl/ilias/kit_ilias_html.py +++ b/PFERD/crawl/ilias/kit_ilias_html.py @@ -428,7 +428,10 @@ class IliasPage: continue prev: Tag = parent.findPreviousSibling("div") if "ilContainerBlockHeader" in prev.get("class"): - found_titles.append(prev.find("h3").getText().strip()) + if prev.find("h3"): + found_titles.append(prev.find("h3").getText().strip()) + else: + found_titles.append(prev.find("h2").getText().strip()) # And this for real accordions if "il_VAccordionContentDef" in parent.get("class"):