On Tue, 22 Mar 2011, fox wrote:

> Il 22/03/2011 21:47, Andrea Forte ha scritto:
>> Hi all - I have poked around on toolserver but I don't seem to see a
>> tool that generates a list/count of user edits for a particular date range.
>> Does anyone know if such a tool exists?
>
> It's possibile to do it by using Wikipedia's API like Stuart Geiger
> said, but it's quite slow because it returns xml (or other format) that
> you have to parse and count edits.

I was confused there for a bit. The API also returns JSON with 
format=json. To me the Wikipedia API seems reasonably responsive in 
Andrea's case (with edits < 500). Here is a Python script for Geiger's 
URL:

>>> import simplejson, urllib
>>> url = 
>>> "http://en.wikipedia.org/w/api.php?action=query&list=usercontribs&ucuser=Andicat&uclimit=5000&ucdir=newer&ucstart=2005-06-01T00:00:01Z&ucend=2007-11-30T23:59:59Z&format=json";
>>> len(simplejson.load(urllib.urlopen(url))["query"]["usercontribs"])


Regards
Finn

___________________________________________________________________

          Finn Aarup Nielsen, DTU Informatics, Denmark
  Lundbeck Foundation Center for Integrated Molecular Brain Imaging
    http://www.imm.dtu.dk/~fn/      http://nru.dk/staff/fnielsen/
___________________________________________________________________


_______________________________________________
Wiki-research-l mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/wiki-research-l

Reply via email to