From 98c2d6969da8f3586efbff0c4fda83ecf7cd2840 Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Sun, 22 May 2022 16:37:39 +0200 Subject: [PATCH] Don't add video URLs only consisting of whitespace. --- bots/sledrun_wikitext_to_json.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bots/sledrun_wikitext_to_json.py b/bots/sledrun_wikitext_to_json.py index b41840c..7ee83ca 100644 --- a/bots/sledrun_wikitext_to_json.py +++ b/bots/sledrun_wikitext_to_json.py @@ -226,8 +226,8 @@ class SledrunWikiTextToJsonBot( bb = next(bb_iter, None) if bb is not None: video = bb.get('video', None) - if isinstance(video, Parameter) and video.value != "": - sledrun_json['videos'] = [{'url': str(video.value)}] + if isinstance(video, Parameter) and video.value.strip() != "": + sledrun_json['videos'] = [{'url': str(video.value.strip())}] _button_bar() def _public_transport(): -- 2.39.5