From 7921eed97c292d6c4a773162b366a700d982a806 Mon Sep 17 00:00:00 2001 From: Floke Date: Sun, 30 Mar 2025 07:52:55 +0000 Subject: [PATCH] Fix: Wikipedia-Branche-Erkennung robuster gegen Formatabweichungen MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - prüft Header-Zellen nun mit `th.text.lower().strip()` auf „branche“ - erkennt auch „ BRANCHE “, „branche\n“, oder Sonderzeichen korrekt --- brancheneinstufung.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/brancheneinstufung.py b/brancheneinstufung.py index 5fe04f87..7bc421d6 100644 --- a/brancheneinstufung.py +++ b/brancheneinstufung.py @@ -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()