Wrong Output
See original GitHub issueI tried this:
import wikipedia
print(wikipedia.search("Ubuntu"))
It gave me this:
/home/sjs/.local/lib/python3.9/site-packages/wikipedia/wikipedia.py:389: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html5lib"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.
The code that caused this warning is on line 389 of the file /home/sjs/.local/lib/python3.9/site-packages/wikipedia/wikipedia.py. To get rid of this warning, pass the additional argument 'features="html5lib"' to the BeautifulSoup constructor.
lis = BeautifulSoup(html).find_all('li')
Traceback (most recent call last):
File "/home/sjs/msg/fbchat/wiki.py", line 2, in <module>
print(wikipedia.summary("Ubuntu"))
File "/home/sjs/.local/lib/python3.9/site-packages/wikipedia/util.py", line 28, in __call__
ret = self._cache[key] = self.fn(*args, **kwargs)
File "/home/sjs/.local/lib/python3.9/site-packages/wikipedia/wikipedia.py", line 231, in summary
page_info = page(title, auto_suggest=auto_suggest, redirect=redirect)
File "/home/sjs/.local/lib/python3.9/site-packages/wikipedia/wikipedia.py", line 276, in page
return WikipediaPage(title, redirect=redirect, preload=preload)
File "/home/sjs/.local/lib/python3.9/site-packages/wikipedia/wikipedia.py", line 299, in __init__
self.__load(redirect=redirect, preload=preload)
File "/home/sjs/.local/lib/python3.9/site-packages/wikipedia/wikipedia.py", line 393, in __load
raise DisambiguationError(getattr(self, 'title', page['title']), may_refer_to)
wikipedia.exceptions.DisambiguationError: "bantu" may refer to:
Bantu languages
Bantu peoples
Bantu knots
Black Association for Nationalism Through Unity
Bantu (band)
Bantu (album)
Bantu FC
Bantu expansion
Bantustan
I installed this package from pip: pip install wikipedia
Python Version: 3.9.1
What’s wrong?
Issue Analytics
- State:
- Created 3 years ago
- Comments:5
Top Results From Across the Web
Sound Coming Out of the Wrong Speaker on Your PC? Try ...
Sound Coming Out of the Wrong Speaker on Your PC? Try This Quick Fix · Quickly Change Your Output Device · Set Default...
Read more >Why is my Python code producing the wrong output? - Quora
So it will always execute elif condition because a character will never equal to an integer. You will get counta = 0 always...
Read more >Help me ! wrong output format Unexpected end of file — int32 ...
The error message is complaining that it's expecting more things in your output (specifically an int32), but instead it found that your output...
Read more >Sound coming out of wrong device/not playing (2 sound outputs)
Sound coming out of wrong device/not playing (2 sound outputs) ... Try setting the speaker as the default audio output device.
Read more >Wrong Output · Issue #137998 · microsoft/vscode - GitHub
Above is the code to reverse a number, the logic is perfectly alright but vs code is returning wrong output, i tried the...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

I’ve started using pymediawiki. Try this out.
Also, “goat” returns results for boat and “sheep” returns results about “ship” xD