How to get html content from a webview?

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

Was this solution helpful to you?

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:

Just Added Q & A:

Find solution

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.