Ankit
Ankit

Reputation: 394

Interacting with Wikipedia's API: grabbing the content of the table present on a page

E.g.

  1. Here is a link http://en.wikipedia.org/wiki/Brad_Pitt_filmography which lists all the films of brad Pitt in table format. I want grab the table content.

Query-> http://en.wikipedia.org/w/api.php?action=query&titles=Brad_Pitt_filmography&

what other parameters will come in the query ?

  1. How can I store it in MySQL Database using Java

Upvotes: 0

Views: 129

Answers (1)

Arash
Arash

Reputation: 154

use "action=parse":

http://en.wikipedia.org/w/api.php?action=parse&format=xml&prop=text&page=Brad_Pitt_filmography&section=1&contentformat=text/plain

you can change "prop" to text(html) or wikitext. for more info please check this: http://en.wikipedia.org/w/api.php?action=help&modules=parse

Upvotes: 2

Related Questions