From: Philipp Spitzer Date: Sat, 16 Jul 2022 07:30:12 +0000 (+0200) Subject: Parse "sledrun list" even if heading is not quoted. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/dabab503699c14a78672f395a7959ae808710e3d Parse "sledrun list" even if heading is not quoted. --- diff --git a/bots/update_sledrun_json_from_wikitext_sledrun_list.py b/bots/update_sledrun_json_from_wikitext_sledrun_list.py index 9c7c00b..eb9e65b 100644 --- a/bots/update_sledrun_json_from_wikitext_sledrun_list.py +++ b/bots/update_sledrun_json_from_wikitext_sledrun_list.py @@ -78,7 +78,8 @@ class UpdateSledrunJsonFromWikiText( sledrun_list = [] line_iter = io.StringIO(value) line = next(line_iter, None) - while line is not None and line.rstrip() != "* '''Andere Rodelbahnen''':": + while line is not None and \ + (line.rstrip() != "* '''Andere Rodelbahnen''':" and line.rstrip() != "* Andere Rodelbahnen:"): line = next(line_iter, None) if line is None: return sledrun_list