From: Philipp Spitzer Date: Sat, 16 Jul 2022 07:22:37 +0000 (+0200) Subject: Parse "see also" links even if heading is not quoted. X-Git-Url: https://git.toastfreeware.priv.at/philipp/winterrodeln/wrpylib.git/commitdiff_plain/3ef85264e3f1dfd22b4d9569cccb08a89f41a010 Parse "see also" links even if heading is not quoted. --- diff --git a/bots/update_sledrun_json_from_wikitext_see_also.py b/bots/update_sledrun_json_from_wikitext_see_also.py index a46c260..c09e6a8 100644 --- a/bots/update_sledrun_json_from_wikitext_see_also.py +++ b/bots/update_sledrun_json_from_wikitext_see_also.py @@ -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') - 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: