On 2016-04-26 11:06, Oleksiy Muzalyev wrote:
I wish in future there would be in addition to "prop=images" an option
in the API "prop=illustrations" to retrieve images in a Wikipedia
article which are actually illustrations such as:
[[File:Grandson-Castle.JPG|thumb|Grandson Castle, aerial photo]]
There kind of is, "prop=pageimages" (provided by an extension:
https://www.mediawiki.org/wiki/Extension:PageImages). It seems that it
only returns one image, though (the one it decides is the most prominent
on the page).
https://en.wikipedia.org/w/api.php?action=query&format=jsonfm&prop=images&titles=The+Fighting+Temeraire
https://en.wikipedia.org/w/api.php?action=query&format=jsonfm&prop=pageimages&titles=The+Fighting+Temeraire
--
Bartosz Dziewoński
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api