From 31249460f0ff65227da75a22b5e09a5cc7618368 Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Mon, 6 Jun 2022 23:54:59 +0200 Subject: [PATCH] Add functionality to parse feratel data. --- bots/update_sledrun_json_from_wikitext_webcam.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/bots/update_sledrun_json_from_wikitext_webcam.py b/bots/update_sledrun_json_from_wikitext_webcam.py index c848909..90a11e2 100644 --- a/bots/update_sledrun_json_from_wikitext_webcam.py +++ b/bots/update_sledrun_json_from_wikitext_webcam.py @@ -79,6 +79,10 @@ class UpdateSledrunJsonFromWikiText( webcam = bb.get('webcam', None) if isinstance(webcam, Parameter) and webcam.value.strip() != "" and 'webcams' not in sledrun_json: sledrun_json['webcams'] = [{'url': str(webcam.value.strip())}] + feratel = bb.get('feratel', None) + if isinstance(feratel, Parameter) and feratel.value.strip() != "" and 'webcams' not in sledrun_json: + s = feratel.value.strip() + sledrun_json['webcams'] = [{'url': f'https://www.feratel.com/webcams/{s}.html'}] _button_bar() jsonschema.validate(instance=sledrun_json, schema=self.sledrun_schema) -- 2.39.5