Wikipedia API:如何在特定类别中搜索术语 [英] Wikipedia API: how to search for a term in a specific category

查看:24
本文介绍了Wikipedia API:如何在特定类别中搜索术语的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我很难弄清楚一项基本任务:如何找到一个术语仅限于特定类别..

I'm having hard time to figure out a basic task: how to find a term restricted in a specific category..

我觉得 Wiki API 文档有点混乱...

i feel Wiki API documentation is kinda confusing...

我只想接收一个 JSON 文件作为输出,其中包含与该术语相关的所有建议

I'd just like to receive as output a JSON file with all the suggestions related to that term

例如.我搜索矩阵,类别电影,所以我可以拥有黑客帝国 1矩阵 2 等,不包括数学结果等...

ex. i search for Matrix, category movies, so i can have The Matrix 1 The Matrix 2 etc excluding math results etc...

谢谢

推荐答案

我觉得你很痛苦,兄弟,试试这样的:

I feel your pain bro, try something like:

http:///en.wikipedia.org/w/api.php?action=query&list=search&format=jsonfm&srsearch=matrix+incategory:English-language_films

把上面的格式从jsonfm改成json,真正的json输出.

Change the above format from jsonfm to json for real json output.

这篇关于Wikipedia API:如何在特定类别中搜索术语的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆