From: Philipp Spitzer Date: Sun, 13 Mar 2022 16:50:41 +0000 (+0100) Subject: Support parsing info_web. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/1d0c6c9e10d218f14a4e35451ea475ed48ef8d46 Support parsing info_web. --- diff --git a/bots/sledrun_wikitext_to_json.py b/bots/sledrun_wikitext_to_json.py index d6e970f..ffc4ff4 100644 --- a/bots/sledrun_wikitext_to_json.py +++ b/bots/sledrun_wikitext_to_json.py @@ -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)