Wikipedia
Wikipedia copied to clipboard
A Pythonic wrapper for the Wikipedia API
(I'm a SRE at the Wikimedia Foundation) We regularly get contacted by people getting rate limited while using the API, either directly or for example using your library. Our API...
Error
I just try: import wikipedia print(wikipedia.summary("google", sentences=1)) but i got the follow error: raise PageError(self.title) wikipedia.exceptions.PageError: Page id "google\" does not match any pages. Try another id! What should i...
When I try to access page with title 'Ranchi', API returns page for 'Ranch': >>> import wikipedia >>> wikipedia.page('Ranchi') Is there any way to force API to return page for...
Hello, I encountered an incorrect operation of the module. Perhaps it is related to the BS4 version. 
I get the following error when running this command "result = wikipedia.search(message, results = 5)" wikipedia.exceptions.WikipediaException: An unknown error occured: "Search request is longer than the maximum allowed length. (Actual:...
- Reformatted code as per [PEP-8 Standards](https://peps.python.org/pep-0008/) using [black formatter](https://github.com/psf/black) and [isort](https://github.com/PyCQA/isort) - Added type hinting - Added exact import statements in `/wikipedia/__init__.py` - Added classifiers in `setup.py`
The configs for the requests are stored as global variables and through them [Global Variables](https://github.com/goldsmith/Wikipedia/blob/master/wikipedia/wikipedia.py#L15-L19) Instead of using these global variables, it would be more convenient for the users and...
An unknown error occured: "Search is currently too busy. Please try again later.". Please report it on GitHub!
It's a awesome library, but I think an async version would benefit a lot of people. 🤷🏻♀️
``` --------------------------------------------------------------------------- WikipediaException Traceback (most recent call last) Cell In[34], [line 4](vscode-notebook-cell:?execution_count=34&line=4) 1 import wikipedia 3 wikipedia.set_lang("en") ----> [4](vscode-notebook-cell:?execution_count=34&line=4) summary = wikipedia.summary("San Francisco 49ers", sentences=2) 5 print(summary) File ~/Documents/Learning/Agentic_Learning/.venv/lib/python3.11/site-packages/wikipedia/util.py:28, in...