When I retrieve this page:
http://wiki.lspace.org/api.php?action=query&prop=revisions&titles=Im...
I get this:
<?xml version="1.0" encoding="utf-8"?><api><query><normalized><n from="Image:Cover_The_Last_Hero.jpg" to="Image:Cover The Last Hero.jpg" /></normalized><pages><page pageid="4963" ns="6" title="Image:Cover The Last Hero.jpg"><revisions><revtimestamp="2008-01-20T13:54:58Z">Illustrated by Paul Kidby
In other words, even though I requested the 'content' of the page, I don't get the URL to the image itself.
By visiting the page normally:
http://wiki.lspace.org/wiki/Image:Cover_The_Last_Hero.jpg
I learned that the image URL is "http://wiki.lspace.org/uploads/4/4e/Cover_The_Last_Hero.jpg".
Is there any way to obtain that URL using the Mediawiki API?
Kelly Jones schreef:
Is there any way to obtain that URL using the Mediawiki API?
api.php?action=query&prop=imageinfo&titles=Image:Cover_The_Last_Hero.jpg&iiprop=url
You can even combine both queries:
api.php?action=query&prop=revisions|imageinfo&titles=Image:Cover_The_Last_Hero.jpg&rvprop=timestamp|content&iiprop=url
Roan Kattouw (Catrope)
Kelly Jones writes:
When I retrieve this page:
http://wiki.lspace.org/api.php?action=query&prop=revisions&titles=Im...
I get this:
<?xml version="1.0" encoding="utf-8"?><api><query><normalized><n
from="Image:Cover_The_Last_Hero.jpg" to="Image:Cover The Last Hero.jpg" /></normalized><pages><page pageid="4963" ns="6" title="Image:Cover The Last Hero.jpg"><revisions><revtimestamp="2008-01-20T13:54:58Z">Illustrated by Paul Kidby
In other words, even though I requested the 'content' of the page, I don't get the URL to the image itself.
By visiting the page normally:
http://wiki.lspace.org/wiki/Image:Cover_The_Last_Hero.jpg
I learned that the image URL is "http://wiki.lspace.org/uploads/4/4e/Cover_The_Last_Hero.jpg".
Is there any way to obtain that URL using the Mediawiki API?
You should user prop=imageinfo --VasilievVV
Kelly Jones wrote:
By visiting the page normally:
http://wiki.lspace.org/wiki/Image:Cover_The_Last_Hero.jpg
I learned that the image URL is "http://wiki.lspace.org/uploads/4/4e/Cover_The_Last_Hero.jpg".
Is there any way to obtain that URL using the Mediawiki API?
Also there's the old (pre-api) way of using [[Special:Filepath/Image:Cover_The_Last_Hero.jpg]] to get it.
mediawiki-api@lists.wikimedia.org