]> ToastFreeware Gitweb - philipp/winterrodeln/wrpylib.git/commitdiff
Parse "see also" links even if heading is not quoted.
authorPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 16 Jul 2022 07:22:37 +0000 (09:22 +0200)
committerPhilipp Spitzer <philipp@spitzer.priv.at>
Sat, 16 Jul 2022 07:22:37 +0000 (09:22 +0200)
bots/update_sledrun_json_from_wikitext_see_also.py

index a46c26027a3df849b54fac4e89d40935f7c2fdc6..c09e6a8de680f174be18c93d9f76cb8bcd6dc02f 100644 (file)
@@ -105,7 +105,7 @@ class UpdateSledrunJsonFromWikiText(
             wikicode_common = next(iter(wikicode.get_sections(levels=[2], matches='Allgemeines')), None)
             wikitext_common = str(wikicode_common)
             lines = wikitext_common.split('\n')
             wikicode_common = next(iter(wikicode.get_sections(levels=[2], matches='Allgemeines')), None)
             wikitext_common = str(wikicode_common)
             lines = wikitext_common.split('\n')
-            lines = dropwhile(lambda line: "'''Siehe auch'''" not in line, lines)
+            lines = dropwhile(lambda line: "'''Siehe auch'''" not in line and '* Siehe auch:' not in line, lines)
             lines = itertools.islice(lines, 1, None)  # omit "Siehe auch" line
             lines = takewhile(lambda line: line.startswith('**'), lines)
             for line in lines:
             lines = itertools.islice(lines, 1, None)  # omit "Siehe auch" line
             lines = takewhile(lambda line: line.startswith('**'), lines)
             for line in lines: