]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Support parsing info_web.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 13 Mar 2022 16:50:41 +0000 (17:50 +0100)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sun, 13 Mar 2022 16:50:41 +0000 (17:50 +0100)
bots/sledrun_wikitext_to_json.py

index d6e970fa8d80e7733abe5875bf0922da10050024..ffc4ff4768f93653957644a544435309dfd681d6 100644 (file)
@@ -229,6 +229,13 @@ class SledrunWikiTextToJsonBot(
             if v is not None:
                 sledrun_json['info_phone'] = [{'phone': p, 'name': n} for p, n in v]
 
+            v, w = rbb['Webauskunft']
+            if v is not None:
+                if v:
+                    sledrun_json['info_web'] = [{'url': w}]
+                else:
+                    sledrun_json['info_web'] = []
+
             v = rbb['Öffentliche Anreise']
             if v is not None:
                 sledrun_json['public_transport'] = public_transport_german_to_str(v)