How to get the Infobox data from Wikipedia?

后端 未结 8 1379
感动是毒
感动是毒 2020-11-28 10:47

If I have the url to a page, how would I obtain the Infobox information on the right using MediaWiki webservices?

8条回答
  •  无人及你
    2020-11-28 11:27

    In our project we use queries for fetching data from wiktionary like this:

    http://query.yahooapis.com/v1/public/yql?q=select%20*%20from%20html%20where%20url%3D%22http%3A%2F%2Fen.wiktionary.org%2Fwiki%2Flife%22%20and%20xpath%3D'%2F%2Fdiv%5B%40id%3D%22bodyContent%22%5D'&format=xml&diagnostics=false&env=store%3A%2F%2Fdatatables.org%2Falltableswithkeys&callback=recwiki
    

    I have no comprehensive understanding of it, but it works. Output result can de filtered using jquery or something else.

提交回复
热议问题