I am using pywikibot
in python to get all revisions of a Wikipedia page.
import pywikibot as pw
wikiPage='Narthaki'
page = pw.Page(pw.Site('en'), wikiPage)
revs = page.revisions(content=True)
How do I know which of the revisions were reverts? I see from https://xtools.wmflabs.org/articleinfo/en.wikipedia.org/Narthaki that the page has one revert edit. Not sure how to get more information about this from the revision object.
Request your help. Many thanks!
"Revert" is not a well-defined concept so it depends on how you define it. (See https://phabricator.wikimedia.org/T152434 for some relevant discussion.) The most capable revert detection tool today is probably mwrevert.