¶ms;
"""
+import io
import json
+import re
from typing import Any, Optional
import mwparserfromhell
if len(x) > 0:
sledrun_json['car_parking'] = x
+ x = []
+ for w in io.StringIO(str(v)):
+ match = re.match(r"\*\* von \'\'\'(.+)\'\'\'(.*): ([\d.,]+) km", w.rstrip())
+ if match:
+ ya, yb, yc = match.groups()
+
+ yc = float(yc.replace(',', '.'))
+ x.append({
+ 'km': yc,
+ 'route': (ya.strip() + ' ' + yb.strip()).strip(),
+ })
+ if len(x) > 0:
+ sledrun_json['car_distances'] = x
+
x = []
for v in wikicode.get_sections(levels=[2], matches='Allgemeines'):
i = iter(v.nodes)