]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Parse webcams.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 6 Jun 2022 20:20:21 +0000 (22:20 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 6 Jun 2022 20:21:13 +0000 (22:21 +0200)
bots/sledrun_wikitext_to_json.py

index 4ec4377f39195299df723064d61daf52718aff1a..9ce3b20ef7a14615ad4a40d8ef088b28ee600aa6 100644 (file)
@@ -205,6 +205,9 @@ class SledrunWikiTextToJsonBot(
                 video = bb.get('video', None)
                 if isinstance(video, Parameter) and video.value.strip() != "":
                     sledrun_json['videos'] = [{'url': str(video.value.strip())}]
                 video = bb.get('video', None)
                 if isinstance(video, Parameter) and video.value.strip() != "":
                     sledrun_json['videos'] = [{'url': str(video.value.strip())}]
+                webcam = bb.get('webcam', None)
+                if isinstance(webcam, Parameter) and webcam.value.strip() != "":
+                    sledrun_json['webcams'] = [{'url': str(webcam.value.strip())}]
                 correction = bb.get('Korrektur_To', None)
                 if isinstance(correction, Parameter) and correction.value.strip() != "":
                     sledrun_json['correction_email'] = correction.value.strip()
                 correction = bb.get('Korrektur_To', None)
                 if isinstance(correction, Parameter) and correction.value.strip() != "":
                     sledrun_json['correction_email'] = correction.value.strip()