我想列出标题和主要图片类别的所有页面。
我目前的API网址是:
结果如下:
....
{
"pageid": 3600962,
"ns": 0,
"title": "Lee Aaker"
},
....
我不知道获得这样的回复的正确参数:
{
"pageid": 3600962,
"ns": 0,
"title": "Lee Aaker",
"thumbnail": {
"original": "https://upload.wikimedia.org/wikipedia/some_image_path.jpg"
}
}
答案 0 :(得分:2)
您可以将categorymembers与pageimages结合使用来实现此目的:
https://en.wikipedia.org/w/api.php?action=query&generator=categorymembers&gcmlimit=100&gcmtitle=Category:American male film actors&prop=pageimages&pilimit=100
gcmtitle=Category:American male film actors
,gcmlimit=100
pilimit=100