]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Only add public transport description when it has a non-standard text.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 22 May 2022 13:45:55 +0000 (15:45 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 22 May 2022 13:45:55 +0000 (15:45 +0200)
bots/sledrun_wikitext_to_json.py

index 9c8909487e086bca9a82eb07700a5ecf4f80f3ce..e06d48a0fa07ad3867b044f1c85d40363e8abb93 100644 (file)
@@ -239,7 +239,8 @@ class SledrunWikiTextToJsonBot(
             node = next((node for node in pt.nodes if isinstance(node, Tag) and node.wiki_markup == '*'), None)
             if node is not None:
                 description = str(Wikicode(pt.nodes[:pt.nodes.index(node)])).strip()
-                if description:
+                if description and not description.startswith("Hier wird beschrieben werden, wie und wie gut man die "
+                                                              "Rodelbahn mit öffentlichen Verkehrsmitteln erreicht."):
                     sledrun_json["public_transport_description"] = str(description)
 
             public_transport_stops = []