Hi,
neither checkuser nor checkuserlog of checkuser extension is well documented and there are no generators implemented yet. You have to setup your own generator e.g. useing api.ListGenerator [2] e.g.
gen = api.ListGenerator(listaction='checkuserlog', total=25, site=pywikibot.Site(), culuser='WikiSysop', cultarget=None, culfrom=None)
cul parameters with None can be omitted. Another way it to use APISite._generator but note that this is a hidden method and may be dropped:
site = pywikibot.Site()
gen = site._generator(api.ListGenerator, type_arg='checkuserlog', total=25, culuser='WikiSysop', cultarget=None, culfrom=None)
Maybe this APISite method should become a public method.
To implement direct APISite methods like APISite.checkuserlog() file a phab task for it.
Best
xqt
[1] https://www.mediawiki.org/wiki/Extension:CheckUser#CheckUser_and_CheckUserLog_API
[2] https://doc.wikimedia.org/pywikibot/master/api_ref/pywikibot.data.html#data.api.ListGenerator
Von: Bináris <wikipo...@gmail.com>
Gesendet: 23.02.2023 21:06
An: Pywikibot discussion list <pywikibot@lists.wikimedia.org>
Betreff: [pywikibot] Re: Checkuser
Gesendet: 23.02.2023 21:06
An: Pywikibot discussion list <pywikibot@lists.wikimedia.org>
Betreff: [pywikibot] Re: Checkuser
Roy Smith <r...@panix.com> ezt írta (időpont: 2023. febr. 23., Cs, 20:09):
It's based on mwclient instead of pywikibot, but I do have some code that uses the checkuserlog API.
Thank you! I don't know mwclient and hate dealing with login, but I will have a look.
_______________________________________________ pywikibot mailing list -- pywikibot@lists.wikimedia.org Public archives at https://lists.wikimedia.org/hyperkitty/list/pywikibot@lists.wikimedia.org/message/KRVKAG77VRS2NVJ7T3B2JASXGZWKZXQO/ To unsubscribe send an email to pywikibot-le...@lists.wikimedia.org