维基媒体 API:为什么这种类型的页面会破坏我的图像查询?
Wikimedia API: Why does this type of page break my image query?
我正在尝试将 WikiMedia API 用于 this wiki,据说它由 MediaWiki 提供支持。使用查询:
action=query&format=json&prop=images
通常,它会给我一个页面上的图像列表。但是对于特定类型的页面,它不会给我页面上清晰的图像。例如:
action=query&format=json&prop=images&titles=Serval
result contains the images on the page,特别是 ServalOriginal.jpg
。但是在这个查询中:
action=query&format=json&prop=images&titles=Serval/Nexon Game
result does not contain the important image ServalOriginal.jpg
, even though it's featured on the page。但是,在类似的查询中:
action=query&format=json&prop=images&titles=Serval/Anime
result does contain the image in the same place, ServalAnime.jpg
, which makes sense given the page.
这出现在整个 wiki 上,但我找不到让我期待这个结果的文档。为什么会这样,我该如何解决才能从所有页面中获取我需要的图像?
默认情况下,图片道具仅 returns 前 10 张图片。要获取页面上的所有可用图像(最多 500 张),请使用 imlimit
属性,如下所示:
我正在尝试将 WikiMedia API 用于 this wiki,据说它由 MediaWiki 提供支持。使用查询:
action=query&format=json&prop=images
通常,它会给我一个页面上的图像列表。但是对于特定类型的页面,它不会给我页面上清晰的图像。例如:
action=query&format=json&prop=images&titles=Serval
result contains the images on the page,特别是 ServalOriginal.jpg
。但是在这个查询中:
action=query&format=json&prop=images&titles=Serval/Nexon Game
result does not contain the important image ServalOriginal.jpg
, even though it's featured on the page。但是,在类似的查询中:
action=query&format=json&prop=images&titles=Serval/Anime
result does contain the image in the same place, ServalAnime.jpg
, which makes sense given the page.
这出现在整个 wiki 上,但我找不到让我期待这个结果的文档。为什么会这样,我该如何解决才能从所有页面中获取我需要的图像?
默认情况下,图片道具仅 returns 前 10 张图片。要获取页面上的所有可用图像(最多 500 张),请使用 imlimit
属性,如下所示: