Hey all,
I'm working on extending the pywikibot.Page object to add methods to get an
article's assessment rating, predicted rating (through ORES[1]), and number
of page views (through the page view API). SuggestBot uses these three
pieces of information when posting suggestions on the English Wikipedia.
I have preliminary code that works[2], and am now trying to extend it with
a couple of generators and bulk loading to increase efficiency. Assessment
ratings are grabbed from talk pages, so that part appears straightforward.
ORES uses revisions IDs, however, so I'm looking for an efficient way to
get "lastrevid" for a list of pages (pywikibot.Page objects).
I can use a PreloadingGenerator for it, as that sets `_revid`, but since I
don't need the page content that seems excessive. Modifying the
`preloadpages` method from site.py is of course possible, but perhaps
there's another alternative here?
References:
1:
https://meta.wikimedia.org/wiki/Objective_Revision_Evaluation_Service
2:
https://github.com/nettrom/suggestbot/blob/newpopqual/suggestbot/utilities/…
Cheers,
Morten