From: Philipp Spitzer Date: Sun, 22 May 2022 13:45:55 +0000 (+0200) Subject: Only add public transport description when it has a non-standard text. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/fcb363efb19d67a6c4d94d65cda79d63b4f767c6 Only add public transport description when it has a non-standard text. --- diff --git a/bots/sledrun_wikitext_to_json.py b/bots/sledrun_wikitext_to_json.py index 9c89094..e06d48a 100644 --- a/bots/sledrun_wikitext_to_json.py +++ b/bots/sledrun_wikitext_to_json.py @@ -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 = []