]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Parse "sledrun list" even if heading is not quoted.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 16 Jul 2022 07:30:12 +0000 (09:30 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 16 Jul 2022 07:30:12 +0000 (09:30 +0200)
bots/update_sledrun_json_from_wikitext_sledrun_list.py

index 9c7c00b307bc45320915f59892c611d0f1bd93dc..eb9e65bd4e4db61a484f76ab09e226fded0bbc0d 100644 (file)
@@ -78,7 +78,8 @@ class UpdateSledrunJsonFromWikiText(
                 sledrun_list = []
                 line_iter = io.StringIO(value)
                 line = next(line_iter, None)
                 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
                     line = next(line_iter, None)
                 if line is None:
                     return sledrun_list