问题
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