Fix: Wikipedia-Branche-Erkennung robuster gegen Formatabweichungen

- prüft Header-Zellen nun mit `th.text.lower().strip()` auf „branche“
- erkennt auch „ BRANCHE “, „branche\n“, oder Sonderzeichen korrekt
This commit is contained in:
2025-03-30 07:52:55 +00:00
parent 74d0b405fd
commit 7921eed97c

View File

@@ -146,7 +146,7 @@ def get_wikipedia_data(name, website_hint=""):
th, td = row.find("th"), row.find("td")
if not th or not td:
continue
if "Branche" in th.text:
if th and "branche" in th.text.lower().strip():
branche = td.text.strip()
if "Umsatz" in th.text:
umsatz_raw = td.text.strip()