mediawiki-api

How can I get the principal image from MediaWiki API?

社会主义新天地 提交于 2019-12-21 17:16:11
问题 Hello I'm using Curl to get information from Wikipedia,and I want to receive only information about the principal image,I don't want to receive all images of an article.. For example.. If I want to get info about all images of the English Language (http://en.wikipedia.org/wiki/English_language) I should go to this URL: http://en.wikipedia.org/w/api.php?action=query&titles=English_Language&prop=images but I receive flags of countries where people speak English in XML: <?xml version="1.0"?>

prop=extracts not returning all extracts in the WikiMedia API

浪尽此生 提交于 2019-12-21 06:14:43
问题 I would like to use the wikipedia API to return the extract from multiple wikipedia articles at once. I am trying, for example, the following request (I just chose the pageids randomly): http://en.wikipedia.org/w/api.php?format=xml&action=query&pageids=3258248|11524059&prop=extracts&exsentences=1 But it only contains the extract for the first pageid, and not the second. Other properties seem not to have this limitation. For example http://en.wikipedia.org/w/api.php?format=xml&action=query

prop=extracts not returning all extracts in the WikiMedia API

こ雲淡風輕ζ 提交于 2019-12-21 06:11:39
问题 I would like to use the wikipedia API to return the extract from multiple wikipedia articles at once. I am trying, for example, the following request (I just chose the pageids randomly): http://en.wikipedia.org/w/api.php?format=xml&action=query&pageids=3258248|11524059&prop=extracts&exsentences=1 But it only contains the extract for the first pageid, and not the second. Other properties seem not to have this limitation. For example http://en.wikipedia.org/w/api.php?format=xml&action=query

prop=extracts not returning all extracts in the WikiMedia API

可紊 提交于 2019-12-21 06:11:36
问题 I would like to use the wikipedia API to return the extract from multiple wikipedia articles at once. I am trying, for example, the following request (I just chose the pageids randomly): http://en.wikipedia.org/w/api.php?format=xml&action=query&pageids=3258248|11524059&prop=extracts&exsentences=1 But it only contains the extract for the first pageid, and not the second. Other properties seem not to have this limitation. For example http://en.wikipedia.org/w/api.php?format=xml&action=query

Using MediaWiki to pull text from a Wikia page but it comes back in a big mess is there a better way I could do this to pull text from each section?

拥有回忆 提交于 2019-12-21 05:21:33
问题 I am developing an Android app that pulls information from a Wikia page and displays it in the app. I currently am pulling all Categories to navigate and have my app set up to display the page in a WebView but I would like to just pull the info and format myself instead of cheapening it by passing to WebView. What I am using to get the text is: http://scottlandminecraft.wikia.com/api.php?format=xml&action=query&titles=ZackScott&prop=revisions&rvprop=content My problem is the text comes back

Fetch famous people from Wikipedia API

感情迁移 提交于 2019-12-20 03:54:24
问题 I'm trying to fetch people who are still alive from Wikipedia API but I haven't figured out how to do it. I found this question which is the same as mine and as far as I understood the only way is to search for people who only have the birth_date parameter, how do I actually do that? For instance, if I wanted to search for "Ronaldo", I should get a list of all people called Ronaldo who are still alive. The only data I care about are date of birth, name and surname, and eventually date of

MediaWiki URL parameters without values

亡梦爱人 提交于 2019-12-19 06:14:10
问题 The query part of a URL seems to consist of key-value pairs separated by & and associated by = . I've taken to always using jQuery's $.param() function to URL-encode my query strings because I find it makes my code more readable and maintainable. In the past couple of days I find myself calling the MediaWiki API but when cleaning up my working prototype with hard-coded URLs to use $.param() I noticed some MediaWiki APIs include query parameters with keys but not values! api.php ? action=query

Wikimedia Commons API search images by (latitude, longitude)

随声附和 提交于 2019-12-18 08:18:13
问题 I would like to retrieve images from Wikimedia Commons to display on a map. This means that given a pair (latitude, longitude) I would like to find pictures around this point. After a day of searching and trying I have still no idea whether this is possible or not. In particular I have read MediaWiki API Main page, the API reference and some examples. So my question is: is it possible to retrieve pictures with a pair of geographical coordinates? If yes, how? 回答1: Yeah, that's possible. On

How to parse Wikipedia XML with PHP?

走远了吗. 提交于 2019-12-17 19:29:46
问题 How to parse Wikipedia XML with PHP? I tried it with simplepie, but I got nothing. Here is a link which I want to get its data. http://en.wikipedia.org/w/api.php?action=query&generator=allpages&gaplimit=2&gapfilterredir=nonredirects&gapfrom=Re&prop=revisions&rvprop=content&format=xml Edit code: <?php define("EMAIL_ADDRESS", "youlichika@hotmail.com"); $ch = curl_init(); $cv = curl_version(); $user_agent = "curl ${cv['version']} (${cv['host']}) libcurl/${cv['version']} ${cv['ssl_version']} zlib

Is there any API in Java to access wikipedia data

倖福魔咒の 提交于 2019-12-17 18:17:26
问题 I want to know: is there any API or a query interface through which I can access Wikipedia data? 回答1: Mediawiki, the wiki platform that wikipedia uses does have an HTTP based API. See MediaWiki API. For example, to get pages with the title stackoverflow, you call http://en.wikipedia.org/w/api.php?action=query&titles=Stackoverflow There are some (incomplete) Java wrappers around the API - see the Client Code - Java section of the API page for more detail. 回答2: For the use with Java, try http:/