Obtaining images using mediawiki apis
Im trying to follow the tutorials from mediawiki
One of the examples they used is http://开发者_运维技巧en.wikipedia.org/w/api.php?action=query&titles=Albert%20Einstein&prop=images
So I am wondering how would i convert File:1919 eclipse positive.jpg into the actual link to the file?
Use the imageinfo
property, as mentioned in the docs. E.g.:
http://en.wikipedia.org/w/api.php?action=query&titles=File:1919%20eclipse%20positive.jpg&prop=imageinfo&iilimit=50&iiend=20071231235959&iiprop=timestamp|user|url
Here is an example in Java: Get the image link
精彩评论