]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Add functionality to parse feratel data.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 6 Jun 2022 21:54:59 +0000 (23:54 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Mon, 6 Jun 2022 21:54:59 +0000 (23:54 +0200)
bots/update_sledrun_json_from_wikitext_webcam.py

index c8489092605ef74d5f778db7ee7008478482f6f7..90a11e2c8fc97997b7245f3fc76f990e7e50feee 100644 (file)
@@ -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)