Thanks, Platonides.
Anand Ramanathan wrote:Use prop=images to get the page images.
> Hi,
> I am building an application where I need to find the most relevant
> commons image for a wikipedia page. For example, if the page has an
> infobox with an image that would be the image I want. If not, I would
> look for an image on the page that is also found on a wikimedia commons
> search for that entity. Otherwise, I fall back to the first result from
> wikimedia commons search.
> Is this the best possible algorithm for this requirement?
> I also considered grabbing the first image from the action=render page,
> but there are two problems there:
> 1. action=render is very slow the first time and can become prohibitive
> for my application.
Maybe create a blacklist of images known to be icons?
> 2. the first image on the action=render page's html is often an icon -
> is there a reasonable way to find the actual first "main" image on that
> page?
_______________________________________________
Mediawiki-api mailing list
Mediawiki-api@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-api