Skip to content

First step towards replacing `wikipedia` package with custom API calls.

Isaac Johnson requested to merge isaacj-use-api-directly into dev

I am starting with a small change which is replacing the wikipedia.search call with custom API calls for the google and wiki search providers. This does not have a huge impact on latency because every search result still triggers a second API call via the wikipedia library, but I pre-filter disambiguation pages and non-article pages, so this does still lower the number of calls in the worse case. A second patch will be required to do the more thorough work of removing dependence on the wikipedia.WikipediaPage object and its functionality. There is no way to skip the API call with each wikipedia.WikipediaPage object creation unfortunately, but they currently serve no purpose after this patch and so can be replaced in the future with no change in final result.

Merge request reports