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:
@@ -146,7 +146,7 @@ def get_wikipedia_data(name, website_hint=""):
|
|||||||
th, td = row.find("th"), row.find("td")
|
th, td = row.find("th"), row.find("td")
|
||||||
if not th or not td:
|
if not th or not td:
|
||||||
continue
|
continue
|
||||||
if "Branche" in th.text:
|
if th and "branche" in th.text.lower().strip():
|
||||||
branche = td.text.strip()
|
branche = td.text.strip()
|
||||||
if "Umsatz" in th.text:
|
if "Umsatz" in th.text:
|
||||||
umsatz_raw = td.text.strip()
|
umsatz_raw = td.text.strip()
|
||||||
|
|||||||
Reference in New Issue
Block a user