Wikipedia API to get articles belonging to a category

萝らか妹 提交于 2019-12-11 20:21:26

问题


I would like to get a number of pages belonging to a specific category, say sports and politics. I would like to extract various sections from the pages, such as abstract, title, etc. Is there an API to do that? If not, are there any Wikipedia dumps organized by categories?

Thanks


回答1:


You're looking for the categorymembers api. Notice that you will only get pages directly in that single category, no subcategories; and there are no intersection operators.

You probably will want to use that list as a generator and query the current revision of each.



来源:https://stackoverflow.com/questions/29242745/wikipedia-api-to-get-articles-belonging-to-a-category

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!