Closed krisgesling closed 3 years ago
Caught another bug while I was testing these changes.
Disambiguation results can refer to other disambiguation pages :loop:
This was raising a DisambiguationError for some queries. So the new function recursively processes disambiguation results to fetch a valid page that is a likely strong result to the original query. It also refers back to the original or "top-level" disambiguation page title as this would best reflect the users question.
Description
In the search for better images it was clear that the existing wikipedia python package being used was abandonware.
pymediawiki
is one of the projects that came out of it and provides a lot of the same functionality but with quite a different wrapper.This PR extends on #69 though primarily replaces it:
title
is a str representing the name of a pagepage
is an instance of theMediaWikiPage
objectArticle
is a combination of data for a page, that isn't all available on the page objectFuture work
Type of PR
Testing
VK tests
Documentation
Docstrings added all round
CLA