Hey,

Is there a nice way to obtain the first image on a page?

My current solution works, but is not very nice:
* get the images on the page via
api.php?action=query&prop=images&titles=pagename
* get the page contest via index.php?title=pagename&action=raw
* find the first occurrence of one of the image names obtained in the API
request

Cheers

--
Jeroen De Dauw
http://www.bn2vs.com
Don't panic. Don't be evil.
--
_______________________________________________
Wikitech-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wikitech-l

Reply via email to