A Python robot that edits Wikipedia and interacts with people over IRC https://en.wikipedia.org/wiki/User:EarwigBot
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
496 B

  1. # -*- coding: utf-8 -*-
  2. from wiki.tools.page import Page
  3. class Category(Page):
  4. """
  5. EarwigBot's Wiki Toolset: Category Class
  6. """
  7. def members(self, limit=50):
  8. """
  9. Docstring needed
  10. """
  11. params = {"action": "query", "list": "categorymembers",
  12. "cmlimit": limit, "cmtitle": self.title}
  13. result = self.site.api_query(params)
  14. members = result['query']['categorymembers']
  15. return [member["title"] for member in members]