parsing - Extract the main article text from a Wikipedia page using Python -
I'm looking for hours to remove the main text of the Wikipedia article without all the links and references. I have tried Wikitol, Müblb, Beautiful Sop and more. But I have not really succeeded.
Is there an easy and fast way to take a clear text (actual article), and put it in a Python variable?
> Solution: Omyid Raha solved this :)
You can use it , Which is the Python Cover API for Wikipedia,
is a quick start.
P = wikipedia.page ("Python Programming Language") Print (P. Ur) Print (PtTL) content = p.content # Page content.
Output:
http://en.wikipedia.org/wiki/Python_ (programming_language) Python (programming language)
Comments
Post a Comment