Skip to content

Commit

Permalink
Merge pull request #424 from xxyzz/ns
Browse files Browse the repository at this point in the history
Replace removed `Wtp.read_by_title()` method
  • Loading branch information
xxyzz authored Dec 8, 2023
2 parents c7094e7 + 19251f7 commit 3214765
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/wiktextract/extractor/en/page.py
Original file line number Diff line number Diff line change
Expand Up @@ -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|...}}",
Expand Down
2 changes: 1 addition & 1 deletion src/wiktextract/wiktwords.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 3214765

Please sign in to comment.