How can I get the HTML content of a Wikipedia Page (via Wikipedia API)?
-
i just want to get content (no link, no categories, no images...just text)
-
Answer:
Are you talking the parsed version of the page as it appears when viewing articles, only minus any binaries or links? If you're just looking for the source pages you can just ask the API to export that. It's text with a bunch of Wikipedia markup codes (similar to simplified HTML code) for creating links, tables, images, etc. If you want the readable version minus these things I'd suggest going in one of two directions. Either start from the source documents and write a dumb mini-parser that basically just ignores and strips markup code, or else ask for the full page version and then strip out the links and binaries from there. Does that make any sense? You might want to ask the Wikipedia help desk, http://en.wikipedia.org/wiki/Wikipedia:Help_desk. If nobody can answer it there they'll probably tell you where to ask. Be sure to report back here with an answer / update if they give you a good answer!
Gil Silberman at Quora Visit the source
Other answers
Using Parsing API of Wikipedia. Read more here its very easy : https://www.mediawiki.org/wiki/API:Parsing_wikitext#parse Example : http://en.wikipedia.org/w/api.php?action=parse&format=json&page=Steve+Jobs&prop=text Go to http://en.wikipedia.org/wiki/Special:ApiSandbox and select parser in Action and then select appropriate parameters as per you want and this will give you query string and result.
Harsh Kothari
What I do is just get a curl call into the URL that I want to get the HTML for and then use the PHP function strip_tags. If you are interested I can show you some code.
Pau Gay
Related Q & A:
- How do I display limited html content in a webview?Best solution by Stack Overflow
- How can I get a good deal at a luxury resort?Best solution by lastminute.com
- How can I get a clinic job as a nurse right out of college?Best solution by Yahoo! Answers
- How can i get this music player on my myspace page?Best solution by Yahoo! Answers
- How can I get AT&T Yahoo as a home page?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.