Wikipedia API: cannot request the image of the day of the day

I have read the MediaWiki API documentation but I cannot find how to get the current URL picture of the day .

Following RTFM, I make a request from Commons: Potd to the URL of my page .

It returns pageid=2518149this is the current POTD page.

Then I try to call prop=imageinfo, but I did not find a way to get the image URL.

The only successful call:

http://commons.wikimedia.org/w/api.php?titles=File:POTD&action=query&prop=images

Successful means that it returns the URL of the image ... but of another pageid(and not the current POTD)!

+5
source share
1

, . Commons:Potd, , Commons:Picture of the Day, .

. Potd, :

http://commons.wikimedia.org/w/api.php?action=expandtemplates&text= {{Potd/{{CURRENTYEAR}} - {{CURRENTMONTH}} - {{CURRENTDAY2}}}}

<api>
  <expandtemplates xml:space="preserve">20110421 Tbilisi Georgia Panoramic.jpg</expandtemplates>
</api>

(URL-) imageinfo, iiprop=url, URL-:

http://commons.wikimedia.org/w/api.php?titles=Image:20110421%20Tbilisi%20Georgia%20Panoramic.jpg&action=query&prop=imageinfo&iiprop=url

! , url:

<api>
  <query>
    <normalized>
      <n from="Image:20110421 Tbilisi Georgia Panoramic.jpg" to="File:20110421 Tbilisi Georgia Panoramic.jpg" />
    </normalized>
    <pages>
      <page pageid="15527584" ns="6" title="File:20110421 Tbilisi Georgia Panoramic.jpg" imagerepository="local">
        <imageinfo>
          <ii url="http://upload.wikimedia.org/wikipedia/commons/a/ae/20110421_Tbilisi_Georgia_Panoramic.jpg" descriptionurl="http://commons.wikimedia.org/wiki/File:20110421_Tbilisi_Georgia_Panoramic.jpg" />
        </imageinfo>
      </page>
    </pages>
  </query>
</api>
+5

All Articles