From 9eff1ff7d7cd81ecc515d60817667d8410239501 Mon Sep 17 00:00:00 2001 From: Philipp Spitzer Date: Sat, 21 May 2022 16:05:41 +0200 Subject: [PATCH] Fix detecting entries under construction. --- bots/sledrun_wikitext_to_json.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/bots/sledrun_wikitext_to_json.py b/bots/sledrun_wikitext_to_json.py index ddbc8eb..83590da 100644 --- a/bots/sledrun_wikitext_to_json.py +++ b/bots/sledrun_wikitext_to_json.py @@ -96,6 +96,9 @@ class SledrunWikiTextToJsonBot( sledrun_json_page = Page(self.site, self.current_page.title() + '/Rodelbahn.json') + if sledrun_json_page.exists(): # should be an option + return + map_json_page = Page(self.site, self.current_page.title() + '/Landkarte.json') map_json = None @@ -106,7 +109,7 @@ class SledrunWikiTextToJsonBot( sledrun_json = { "name": self.current_page.title(), "aliases": [], - "entry_under_construction": sum(1 for c in wikilink_list if c.text == 'Kategorie:In Arbeit') > 0, + "entry_under_construction": sum(1 for c in wikilink_list if c.title == 'Kategorie:In Arbeit') > 0, } optional_set(sledrun_json, 'description', get_sledrun_description(wikicode)) -- 2.39.5