From 19251f7feff157bc519951f4b899daff30462552 Mon Sep 17 00:00:00 2001 From: xxyzz Date: Fri, 8 Dec 2023 15:42:33 +0800 Subject: [PATCH] Replace removed `Wtp.read_by_title()` method --- src/wiktextract/extractor/en/page.py | 2 +- src/wiktextract/wiktwords.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wiktextract/extractor/en/page.py b/src/wiktextract/extractor/en/page.py index 62bfcb6a..a57cc191 100644 --- a/src/wiktextract/extractor/en/page.py +++ b/src/wiktextract/extractor/en/page.py @@ -1929,7 +1929,7 @@ def get_subpage_section(title, subtitle, seq): for x in seq: assert isinstance(x, str) subpage_title = word + "/" + subtitle - subpage_content = wxr.wtp.read_by_title(subpage_title) + subpage_content = wxr.wtp.get_page_body(subpage_title, 0) if subpage_content is None: wxr.wtp.error("/translations not found despite " "{{see translation subpage|...}}", diff --git a/src/wiktextract/wiktwords.py b/src/wiktextract/wiktwords.py index d9423c21..6a896d17 100755 --- a/src/wiktextract/wiktwords.py +++ b/src/wiktextract/wiktwords.py @@ -78,7 +78,7 @@ def process_single_page( else: # Get page content from database title = path_or_title - text = wxr.wtp.read_by_title(title) + text = wxr.wtp.get_page_body(title, 0) if text is None: logging.error(f"Can't find page '{title}' in the database.") return