From: Philipp Spitzer Date: Sun, 22 May 2022 13:46:13 +0000 (+0200) Subject: Only add car description when it has a non-standard text. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/766962a13786a5caaa7a8e95aa29a44e466b6f44 Only add car 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 e06d48a..58ec446 100644 --- a/bots/sledrun_wikitext_to_json.py +++ b/bots/sledrun_wikitext_to_json.py @@ -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(): - 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'):