From: Philipp Spitzer Date: Sun, 22 May 2022 14:10:55 +0000 (+0200) Subject: Only add non-empty descriptions. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/d31a92eca58185196fa0fd0a3ffcb3a79762121e Only add non-empty descriptions. --- diff --git a/bots/sledrun_wikitext_to_json.py b/bots/sledrun_wikitext_to_json.py index 58ec446..196c0ce 100644 --- a/bots/sledrun_wikitext_to_json.py +++ b/bots/sledrun_wikitext_to_json.py @@ -401,7 +401,9 @@ class SledrunWikiTextToJsonBot( while line is not None and re.match(r"\* ", line) is None: result.append(line) line = next(line_iter, None) - sledrun_json['sled_rental_description'] = ''.join(result).strip() + description = ''.join(result).strip() + if len(description) > 0: + sledrun_json['sled_rental_description'] = description _sled_rental_description() i = iter(v.nodes)