Remove rvlimit=max, fails in MediaWiki 1.16

For instance:
"Exception Caught: Internal error in ApiResult::setElement: Attempting to add element revisions=50, existing value is 500"
https://wiki.rabenthal.net/api.php?action=query&prop=revisions&titles=Hauptseite&rvprop=ids&rvlimit=max
pull/359/head
Federico Leva 4 years ago
parent 6b12e20a9d
commit 0f35d03929

@ -915,11 +915,12 @@ def getXMLRevisions(config={}, session=None, allpages=False):
# The XML needs to be made manually because the export=1 option
# refuses to return an arbitrary number of revisions (see above).
for title in readTitles(config):
# Try and ask everything. At least on MediaWiki 1.16, uknown props are discarded:
# "warnings":{"revisions":{"*":"Unrecognized values for parameter 'rvprop': userid, sha1, contentmodel"}}}
pparams = {
'action': 'query',
'titles': title,
'prop': 'revisions',
'rvlimit': 'max',
'rvprop': 'ids|timestamp|user|userid|size|sha1|contentmodel|comment|content',
}
prequest = site.api(**pparams)

Loading…
Cancel
Save