How to get all article pages under a Wikipedia Category and its sub-categories?

后端 未结 3 719
既然无缘
既然无缘 2020-12-09 09:03

I want to get all the articles names under a category and its sub-categories.

Options I\'m aware of:

  1. Using the Wikipedia API. Does it have such an opt
3条回答
  •  独厮守ぢ
    2020-12-09 09:32

    Note that Wikipedia's categorization system is not a tree, or even an acyclic graph. It is quite possible that by continually following subcategory links you will eventually wind up back where you started.

    If you are going to be making many such queries, you would be best served by downloading a database dump. If this will be an infrequent thing and will only be dealing with small categories, you could probably get away with making repeated queries to list=categorymembers.

    incategory:"music" does not appear to do subcategory searching.

提交回复
热议问题