Fix some accordions

This commit is contained in:
I-Al-Istannen 2022-01-08 16:58:30 +01:00
parent 6f3cfd4396
commit ced8b9a2d0

View File

@ -428,7 +428,10 @@ class IliasPage:
continue continue
prev: Tag = parent.findPreviousSibling("div") prev: Tag = parent.findPreviousSibling("div")
if "ilContainerBlockHeader" in prev.get("class"): 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 # And this for real accordions
if "il_VAccordionContentDef" in parent.get("class"): if "il_VAccordionContentDef" in parent.get("class"):