维基百科的API:如何寻找一个长期在一个特定的类别 [英] Wikipedia API: how to search for a term in a specific category

查看:151
本文介绍了维基百科的API:如何寻找一个长期在一个特定的类别的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有很难搞清楚一个基本的任务:如何找到一个术语
限制在一个特定的类别。

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

我觉得维基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:

<一个href=\"http://en.wikipedia.org/w/api.php?action=query&list=search&format=jsonfm&srsearch=matrix+incategory:English-language_films\">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.

这篇关于维基百科的API:如何寻找一个长期在一个特定的类别的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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