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

index e06d48a0fa07ad3867b044f1c85d40363e8abb93..58ec4465a0a592a8127446d8e50542928bd9ff7b 100644 (file)
@@ -302,7 +302,9 @@ class SledrunWikiTextToJsonBot(
             description_nodes = takewhile(lambda w: not (isinstance(w, Tag) and w.wiki_markup == '*'),
                                           description_nodes)
             if description := str(Wikicode(list(description_nodes))).strip():
             description_nodes = takewhile(lambda w: not (isinstance(w, Tag) and w.wiki_markup == '*'),
                                           description_nodes)
             if description := str(Wikicode(list(description_nodes))).strip():
-                sledrun_json["car_description"] = description
+                if not description.startswith("Hier wollen wir Besonderheiten beschreiben, die es zu beachten gibt, "
+                                              "wenn man mit dem Auto zur Rodelbahn anreist."):
+                    sledrun_json["car_description"] = description
 
             x = []
             for w in v.ifilter_templates(matches='Parkplatz'):
 
             x = []
             for w in v.ifilter_templates(matches='Parkplatz'):