mediawiki-api

How to use wikipedia api if it exists? [closed]

爷,独闯天下 提交于 2019-11-27 02:36:51
I'm trying to find out if there's a wikipedia api (I Think it is related to the mediawiki?). If so, I would like to know how I would tell wikipedia to give me an article about the new york yankees for example. What would the REST url be for this example? All the docs on this subject seem fairly complicated. You really really need to spend some time reading the documentation, as this took me a moment to look and click on the link to fix it. :/ but out of sympathy i'll provide you a link that maybe you can learn to use. http://en.wikipedia.org/w/api.php?action=query&prop=revisions&titles=New

Get Text Content from mediawiki page via API

早过忘川 提交于 2019-11-26 15:19:18
问题 I'm quite new to MediaWiki, and now I have a bit of a problem. I have the title of some Wiki page, and I want to get just the text of a said page using api.php , but all that I have found in the API is a way to obtain the Wiki content of the page (with wiki markup). I used this HTTP request... /api.php?action=query&prop=revisions&rvlimit=1&rvprop=content&format=xml&titles=test But I need only the textual content, without the Wiki markup. Is that possible with the MediaWiki API? 回答1: I don't

$getJSON and for loop issue

断了今生、忘了曾经 提交于 2019-11-26 14:05:11
问题 This is to populate a table with the amount of results that are returned from the MediaWiki API query /api.php?action=query&list=querypage&qppage=BrokenRedirects . The number of results is then added to the id, for example: // BrokenRedirects $.getJSON('/api.php?action=query&list=querypage&qppage=BrokenRedirects&format=json', function (data) { $('#BrokenRedirects').text(data.query.querypage.results.length); }); But as it's being repeated another 7 times I made the arguments for qppage into an

How to retrieve Wiktionary word content?

巧了我就是萌 提交于 2019-11-26 11:46:32
问题 How may Wiktionary\'s API be used to determine whether or not a word exists? 回答1: The Wiktionary API can be used to query whether or not a word exists. Examples for existing and non-existing pages: http://en.wiktionary.org/w/api.php?action=query&titles=test http://en.wiktionary.org/w/api.php?action=query&titles=testx The first link provides examples on other types of formats that might be easier to parse. To retrieve the word's data in a small XHTML format (should more than existence be

How to use wikipedia api if it exists? [closed]

空扰寡人 提交于 2019-11-26 10:07:08
问题 I\'m trying to find out if there\'s a wikipedia api (I Think it is related to the mediawiki?). If so, I would like to know how I would tell wikipedia to give me an article about the new york yankees for example. What would the REST url be for this example? All the docs on this subject seem fairly complicated. 回答1: You really really need to spend some time reading the documentation, as this took me a moment to look and click on the link to fix it. :/ but out of sympathy i'll provide you a link

Is there a Wikipedia API?

╄→尐↘猪︶ㄣ 提交于 2019-11-26 03:17:50
问题 On my Wikipedia user page, I run a Wikipedia script that displays my statistics (number of pages edited, number of new pages, monthly activity, etc.). I\'d like to put this information on my blog. Is there an API that would allow me to do something like this? 回答1: MediaWiki's API is running on Wikipedia (docs). You can also use the Special:Export feature to dump data and parse it yourself. More information. 回答2: Wikipedia is built on MediaWiki, and here's the MediaWiki API. 回答3: If you want