Last modified: 2014-10-19 22:05:17 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T74243, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 72243 - Implement site.wantedcategories
Implement site.wantedcategories
Status: RESOLVED FIXED
Product: Pywikibot
Classification: Unclassified
General (Other open bugs)
core-(2.0)
All All
: Unprioritized trivial
: ---
Assigned To: Pywikipedia bugs
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-10-19 20:58 UTC by CodeCat
Modified: 2014-10-19 22:05 UTC (History)
1 user (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description CodeCat 2014-10-19 20:58:05 UTC
The Site object currently has a wantedpages method, but it is lacking an equivalent wantedcategories method. The following code, inserted at line 4686 in site.py (above the existing wantedpages), works for me:

def wantedcategories(self, step=None, total=None):
    """Yield Pages from Special:Wantedcategories.

    @param step: request batch size
    @param total: number of pages to return
    """
    wcgen = self._generator(api.CategoryPageGenerator,
                            type_arg="querypage", gqppage="Wantedcategories",
                            step=step, total=total)
        
    return wcgen
Comment 1 Gerrit Notification Bot 2014-10-19 21:10:34 UTC
Change 167519 had a related patch set uploaded by XZise:
[FEAT] Site: Add wantedcategories

https://gerrit.wikimedia.org/r/167519
Comment 2 Gerrit Notification Bot 2014-10-19 21:49:21 UTC
Change 167519 merged by jenkins-bot:
[FEAT] Site: Add wantedcategories

https://gerrit.wikimedia.org/r/167519

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links