我使用以下维基媒体API列出具有特定类别的所有网页:https://www.mediawiki.org/wiki/API:Categorymembers
E.g。 https://en.wikipedia.org/w/api.php?action=query&list=categorymembers&cmtitle=Category:Physics
这给了我一个带有标题和id的页面列表,但我也希望看到每个页面的所有类别。然而,似乎没有cmprop。
cmprop: Which properties to get. (Default: ids|title)
ids: Page ID
title: Page title
sortkey: The sortkey used for sorting in the category (hexadecimal string)
sortkeyprefix: The sortkey prefix used for sorting in the category (human-readable part of the sortkey) 1.17+
type: Type that the page has been categorised as (page, subcat or file) 1.17+
timestamp: Time and date the article was added to the category
我已经考虑过查询每个页面并使用prop = categories来获取每个页面的类别,但这意味着会有大量的查询。有没有更好的方法呢?