Hello.
2010/5/25 Matias plinbox@gmail.com:
On 10-05-24 10:38 PM, Matias wrote:
I think it can be donned via the API with "prop=revisions" and a combination of parameters specially "rvdiffto".
The API diff returns an HTML table (ie the same thing you see on-wiki, there's just no interface or CSS). I think it is just a matter of implementing it in pywikibot (yay for the name change!) if it hasn't been done already.
- -Mike
I think it returns an XML as default. I want to make the query as smaller as possible.
I think that what Mike meant was: the diff data is returned as HTML. API has various ways to output data, and you are right, default format is XMLFM. BUT the diff data, as in the data in the <diff> tag returned by ?action=query&prop=revisions&rvdiffto=prev is HTML content.
I'm only interested in new additions, as far as I could see, new additions are inside <td class="diff-addedline"> and there in <span class="diffchange">. At least this is true in the non-API query. I manage to get the diff output with the API and those tags are represented in this way: http://pastebin.com/Myv1976Y this is for XMLFM (default output).
API DIFF: http://es.wikipedia.org/w/api.php?action=query&prop=revisions&rvstar...
NON-API DIFF: http://es.wikipedia.org/w/index.php?diff=37372500&oldid=32780367&dif...
I think this is not yet implemented in the framework.
It's not implemented as high level API, but building yourself a query is easy. Look into site.py:loadrevisions for directions on how to do it.
And if you were to submit a patch, I'm sure that Russell would be happy to apply it =)
Regards,
Matias.