From d31a92eca58185196fa0fd0a3ffcb3a79762121e Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Sun, 22 May 2022 16:10:55 +0200 Subject: [PATCH] Only add non-empty descriptions. --- bots/sledrun_wikitext_to_json.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) -- 2.39.5