Hello Jerome,

I'm not sure this is the best way, but pywikipediabot [1] has a library called pagegenerators.py and there is a function def UserContributionsGenerator(username) (around line 706). That would allow you to iterate through theses user names, and I bet there will be a special marking for deletions/undeletions. If not, worst comes to worse you can use a regular expression for those words.

[1] https://meta.wikimedia.org/wiki/pywikipediabot

When you use have a pywikibot-hammer everything looks like a pywikibot-nail!   

Maximilian Klein
Wikipedian in Residence, OCLC

From: wiki-research-l-bounces@lists.wikimedia.org <wiki-research-l-bounces@lists.wikimedia.org> on behalf of Jérôme Hergueux <jerome.hergueux@gmail.com>
Sent: Thursday, October 10, 2013 3:11 AM
To: wiki-research-l@lists.wikimedia.org
Subject: [Wiki-research-l] How to collect all the admin-specific edits for a subset of Wp admins
Dear all,

I am starting this thread in the hope that some of the great Wiki researchers on this list could advise me on a data collection problem.

Here is the question: for a each of 120 Wikipedia admins (for whom I have the usernames and unique numeric ids), I would like to reliably count the number of times they (i) deleted a page (ii) undeleted (i.e. restored) a page (iii) protected a page (iv) blocked a user and (v) unblocked a user.
Those types of edits all correspond to a specific "action" in the Wikipedia API documentation page (http://en.wikipedia.org/w/api.php): action=delete, action=undelete, action=protect, action=block and action=unblock.
I don't know, however, what would be the best strategy to go about collecting those edits. Does anyone have an idea about which data collection strategy I should adopt in this case? Is there a way to query the Wikipedia API directly, or should I look for some specific markers in the edit summaries?

I would be very grateful for any advice of feedback!
Thanks much for your attention and time. :)