From: Philipp Spitzer Date: Sun, 22 May 2022 13:42:55 +0000 (+0200) Subject: Don't add gastronomy only consisting of "...". X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/2cc59345a964f99335de0368e2afd20fbe223e0f Don't add gastronomy only consisting of "...". --- diff --git a/bots/sledrun_wikitext_to_json.py b/bots/sledrun_wikitext_to_json.py index 3bc293e..9c89094 100644 --- a/bots/sledrun_wikitext_to_json.py +++ b/bots/sledrun_wikitext_to_json.py @@ -373,9 +373,10 @@ class SledrunWikiTextToJsonBot( g['name'] = name if len(note) > 0: g['note'] = note - elif len(remaining) > 0: + elif len(remaining) > 0 and remaining != '...': g['name'] = remaining - gastronomy.append(g) + if len(gastronomy) != 0: + gastronomy.append(g) else: break return gastronomy