Hi,
Short answer: The API does not seem to directly provide such info, but
you could use action=compare, then search for class=\"diff-lineno\"
and divide by 2 (it appears once on each side of the diff).
Do note that the question you ask is not very well defined. The method
above will give you the number of chunks the diff engine displays,
which can be different from what you consider as a modification. For
instance
https://ro.wikipedia.org/w/api.php?action=compare&fromrev=9648318&t…
shows 1 chunk, but there is a modified line and an added line (the
category), which you might consider as 2 different modifications. You
need to clearly set the expectations before searching for a solution.
Strainu
2016-08-03 0:23 GMT+03:00 Bináris <wikiposta(a)gmail.com>om>:
Hi folks,
given a difflink between two states of a page, is there a way to tell by
bot, how many modifications there are? I.e. in how many fragments those two
differ? I know, this is not an exact question, but the software itself
interprets it somehow as it tries to emphasize differences with colors.
--
Bináris
_______________________________________________
Wikitech-l mailing list
Wikitech-l(a)lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/wikitech-l