Wikipedia-API
Wikipedia-API copied to clipboard
grabbing a fixed number of pages in a given category
I'm trying to make a request to get pages in a given categories, but only a fixed number of them. I know that to get all of them one can do the following :
wiki_wiki = wikipediaapi.Wikipedia('en')
cat = wiki_wiki.page("Category:Featured articles")
request = wiki_wiki.categorymembers(page = cat)
print(request)
this is working, however, I'd like to pass more parameters to the query, in particular limiting the number of pages returned, I tried to change line 3 by :
request = wiki_wiki.categorymembers(page = cat, cmlimit = 10)
it simply seems to ignore the parameter cmlimit. I tried passing it as a string too, doesn't work either. Could you please help me ? I also think it could be valuable to add this as an example in the documentation.
I'd also like to use the parameter "cmstart" from the API, but I get the same result, it's simply ignored.