Page MenuHomePhabricator

Enhance PetScanPageGenerator with depth
Open, MediumPublicFeature

Description

Feature summary (what you would like to be able to do and where):
PetScan offers the depth field. If it is not filled, only the direct members of categories will be searched for.

Use case(s) (list the steps that you performed to discover that problem, and describe the actual underlying problem which you want to solve. Do not describe only a solution):
Whenever I want to use PetScanPageGenerator. :-)

See https://petscan.wmflabs.org/.

Event Timeline

I tried, it is very easy. __init__() and buildQuery() has to be modified.

From line 1153 in _generators.py I added one line:

query = {
    'language': self.site.code,
    'project': self.site.hostname().split('.')[-2],
    'depth': 30,
    'combination': 'subset' if subset_combination else 'union',
    'categories': '\r\n'.join(categories),
    'format': 'json',
    'doit': ''
}

It works.

Xqt triaged this task as Medium priority.Apr 7 2023, 6:59 PM