goldsmith / Wikipedia

A Pythonic wrapper for the Wikipedia API
https://wikipedia.readthedocs.org/
MIT License
2.89k stars 519 forks source link

Title resolution leads to internal error #316

Open grossmanm opened 2 years ago

grossmanm commented 2 years ago

Whenever I run the line wikipedia.page("New York City") The api returns an error indicating there is no page for 'new york sity'. The error occurs on line 270 of wikipedia.py results, suggestion = search(title, results=1, suggestion=True) where title='new york city' resolves to 'new york sity' for whatever reason

arez-khidr commented 1 month ago

I had this error as well. Seems to be an error in the API, when I ran this, it returned that "new york sity" is the actual title for the page. Which is ridiculous, here is my code though:

import wikipedia

suggestion = wikipedia.suggest("New York City")

sity = wikipedia.page(suggestion) print(sity.url)