]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Ignore empty bus stop.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 22 May 2022 13:35:48 +0000 (15:35 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 22 May 2022 13:35:48 +0000 (15:35 +0200)
bots/sledrun_wikitext_to_json.py

index 83590dad94a4646d89476f026f30d3a11c244e56..ba898e9ad711d63ff7e21bc54cb4c0e3b6137c98 100644 (file)
@@ -251,6 +251,8 @@ class SledrunWikiTextToJsonBot(
                     if node.name == 'Haltestelle':
                         if ya is not None:
                             public_transport_stops.append(ya)
                     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:
                         ya = {}
                         z = node.get(1, None)
                         if z is not None: