Wikipedia-API
Wikipedia-API copied to clipboard
How get a page by URL?
Is there a way to get a page by URL instead of title?
TIA! Yoel
just use the split method?
import wikipediaapi
wiki_wiki = wikipediaapi.Wikipedia(user_agent='john ([email protected])',language='en')
url = "https://en.wikipedia.org/wiki/GitHub"
page = wiki_wiki.page(url.split("/")[-1])
if page.exists():
print(page.title)
print(page.summary)
This issue is stale because it has been open 45 days with no activity. Remove stale label or comment or this will be closed in 5 days.
This issue was closed because it has been stalled for 10 days with no activity.