小编Ric*_*son的帖子

Mediawiki API:如何列出一个类别的所有页面并为每个页面显示所有类别?

我正在使用以下 wikimedia API 列出具有特定类别的所有页面:https : //www.mediawiki.org/wiki/API :Categorymembers

例如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 …
Run Code Online (Sandbox Code Playgroud)

mediawiki wikipedia wikipedia-api mediawiki-api

5
推荐指数
1
解决办法
3152
查看次数