From: Philipp Spitzer Date: Mon, 6 Jun 2022 21:54:59 +0000 (+0200) Subject: Add functionality to parse feratel data. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/31249460f0ff65227da75a22b5e09a5cc7618368 Add functionality to parse feratel data. --- 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)