You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>>> import wikipedia as w
>>> w.page("bass")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\-\AppData\Local\Programs\Python\Python39\lib\site-packages\wikipedia\wikipedia.py", line 276, in page
return WikipediaPage(title, redirect=redirect, preload=preload)
File "C:\Users\-\AppData\Local\Programs\Python\Python39\lib\site-packages\wikipedia\wikipedia.py", line 299, in __init__
self.__load(redirect=redirect, preload=preload)
File "C:\Users\-\AppData\Local\Programs\Python\Python39\lib\site-packages\wikipedia\wikipedia.py", line 367, in __load
self.__init__(redirects['to'], redirect=redirect, preload=preload)
File "C:\Users\-\AppData\Local\Programs\Python\Python39\lib\site-packages\wikipedia\wikipedia.py", line 299, in __init__
self.__load(redirect=redirect, preload=preload)
File "C:\Users\-\AppData\Local\Programs\Python\Python39\lib\site-packages\wikipedia\wikipedia.py", line 393, in __load
raise DisambiguationError(getattr(self, 'title', page['title']), may_refer_to)
wikipedia.exceptions.DisambiguationError: "Band" may refer to:
Bánd
Band, Iran
Band, Mureș
Band-e Majid Khan
Band (surname)
Musical ensemble
Band (rock and pop)
Concert band
Dansband
Jazz band
Marching band
...
Searching for "band" appears to search for "and".
>>> import wikipedia as w
>>> w.page("band")
C:\Users\-\AppData\Local\Programs\Python\Python39\lib\site-packages\wikipedia\wikipedia.py:389: GuessedAtParserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("html.parser"). 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 C:\Users\-\AppData\Local\Programs\Python\Python39\lib\site-packages\wikipedia\wikipedia.py. To get rid of this warning, pass the additional argument 'features="html.parser"' to the BeautifulSoup constructor.
lis = BeautifulSoup(html).find_all('li')
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "C:\Users\-\AppData\Local\Programs\Python\Python39\lib\site-packages\wikipedia\wikipedia.py", line 276, in page
return WikipediaPage(title, redirect=redirect, preload=preload)
File "C:\Users\-\AppData\Local\Programs\Python\Python39\lib\site-packages\wikipedia\wikipedia.py", line 299, in __init__
self.__load(redirect=redirect, preload=preload)
File "C:\Users\-\AppData\Local\Programs\Python\Python39\lib\site-packages\wikipedia\wikipedia.py", line 393, in __load
raise DisambiguationError(getattr(self, 'title', page['title']), may_refer_to)
wikipedia.exceptions.DisambiguationError: "and" may refer to:
Conjunction (grammar)
Logical conjunction
Bitwise AND
short-circuit operator
Ampersand
AND gate
And (John Martyn album)
And (Koda Kumi album)
A N D (Tricot album)
Jonah Matranga
...
The text was updated successfully, but these errors were encountered:
Searching for "bass" searches for "band."
Searching for "band" appears to search for "and".
The text was updated successfully, but these errors were encountered: