Wikipedia icon indicating copy to clipboard operation
Wikipedia copied to clipboard

Throwing exception Showing different results from actual search

Open ayushmi77al opened this issue 4 years ago • 3 comments

wikipedia.exceptions.WikipediaException: An unknown error occured: "The "srsearch" parameter must be set.". Please report it on GitHub! It is also showing different results like showing about gold instead of god and hell instead of hello like this.

ayushmi77al avatar Dec 10 '20 14:12 ayushmi77al

I can confirm this issue as well. Some results show the wrong ids, for example discord: PageError: Page id "discor" does not match any pages. Try another id!

35ch avatar Dec 29 '20 10:12 35ch

Having the same issue, seems that some names or strings get parsed the wrong way. Examples:

  1. With name "Elon Musk", using wikipedia.search("Elon Musk"), I get: ['Elon Musk', 'Views of Elon Musk', "Elon Musk's Tesla Roadster", 'The Boring Company', 'Kimbal Musk', 'Maye Musk', 'Talulah Riley', 'Tosca Musk', 'Justine Musk', 'Elon Musk: Tesla, SpaceX, and the Quest for a Fantastic Future'] which is correct, but if I try wikipedia.page("Elon Musk") I get: PageError: Page id "e on musk" does not match any pages. Try another id!

If I try wikipedia.page('Tim Ferriss') which gives good results using .search(), it makes the same error: PageError: Page id "tim ferris’s" does not match any pages. Try another id!

I think the author is using some regex rules to parse what could look like an apostrophe (like something's in Ferriss) and for "Elon" as "e on" is parsin the "l" as a separator?

thepartisan101 avatar Mar 23 '21 14:03 thepartisan101

Auto suggestion is on by default for page and summary. Turn it off by passing auto_suggest=False.

@goldsmith Results from Wikipedia's autosuggestion are unbelievably bad, and shouldn't be the default for anything. Maybe they were decentish 8 years ago when that code was written.

wlerin avatar May 03 '21 11:05 wlerin