diff --git a/wikihow2zim/scraper.py b/wikihow2zim/scraper.py index 91835c8..93717e0 100644 --- a/wikihow2zim/scraper.py +++ b/wikihow2zim/scraper.py @@ -44,7 +44,6 @@ class DomIntegrityError(Exception): class wikihow2zim(GlobalMixin): def __init__(self, **kwargs): - Global.conf = Conf(**kwargs) for option in Global.conf.required: if getattr(Global.conf, option) is None: @@ -326,11 +325,18 @@ def build_expected_categories(self): while query_list: item = query_list.pop() + logger.debug( + "Querying categorymembers of " + f"{self.metadata['category_prefix']}:{item}" + ) for query in self.api_site.query( list="categorymembers", cmtitle=f"{self.metadata['category_prefix']}:{item}", cmtype="subcat", ): + logger.debug( + f"categorymembers returned: {query.get('categorymembers')}" + ) for cat_member in query.get("categorymembers"): # only interested in (sub)categories if cat_member.get("ns") != 14: