From: Philipp Spitzer Date: Sun, 22 May 2022 13:35:48 +0000 (+0200) Subject: Ignore empty bus stop. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/6cc6360f4cdf948745eaaeebbb2472ba84de91d0 Ignore empty bus stop. --- diff --git a/bots/sledrun_wikitext_to_json.py b/bots/sledrun_wikitext_to_json.py index 83590da..ba898e9 100644 --- a/bots/sledrun_wikitext_to_json.py +++ b/bots/sledrun_wikitext_to_json.py @@ -251,6 +251,8 @@ class SledrunWikiTextToJsonBot( if node.name == 'Haltestelle': if ya is not None: public_transport_stops.append(ya) + if len([1 for p in node.params if len(p.strip()) != 0]) == 0: + continue ya = {} z = node.get(1, None) if z is not None: