@ -983,7 +983,7 @@ def getXMLRevisions(config={}, session=None, allpages=False, start=None):
' action ' : ' query ' ,
' action ' : ' query ' ,
' titles ' : ' | ' . join ( titlelist ) ,
' titles ' : ' | ' . join ( titlelist ) ,
' prop ' : ' revisions ' ,
' prop ' : ' revisions ' ,
#'rvlimit': 50 ,
' rvlimit ' : 50 ,
' rvprop ' : ' ids|timestamp|user|userid|size|sha1|contentmodel|comment|content ' ,
' rvprop ' : ' ids|timestamp|user|userid|size|sha1|contentmodel|comment|content ' ,
}
}
try :
try :
@ -992,7 +992,7 @@ def getXMLRevisions(config={}, session=None, allpages=False, start=None):
if e . response . status_code == 405 and config [ ' http_method ' ] == " POST " :
if e . response . status_code == 405 and config [ ' http_method ' ] == " POST " :
print ( " POST request to the API failed, retrying with GET " )
print ( " POST request to the API failed, retrying with GET " )
config [ ' http_method ' ] = " GET "
config [ ' http_method ' ] = " GET "
ex port request = site . api ( http_method = config [ ' http_method ' ] , * * exportparams )
prequest = site . api ( http_method = config [ ' http_method ' ] , * * exportparams )
except mwclient . errors . InvalidResponse :
except mwclient . errors . InvalidResponse :
logerror (
logerror (
config = config ,
config = config ,
@ -1028,8 +1028,8 @@ def getXMLRevisions(config={}, session=None, allpages=False, start=None):
# Get next batch of revisions if there's more.
# Get next batch of revisions if there's more.
if ' continue ' in prequest . keys ( ) :
if ' continue ' in prequest . keys ( ) :
print ( " Getting more revisions for the page " )
print ( " Getting more revisions for the page " )
for key , value in prequest [ ' continue ' ] :
for key , value in prequest [ ' continue ' ] . iteritems ( ) :
p arams[ key ] = value
p p arams[ key ] = value
elif ' query-continue ' in prequest . keys ( ) :
elif ' query-continue ' in prequest . keys ( ) :
rvstartid = prequest [ ' query-continue ' ] [ ' revisions ' ] [ ' rvstartid ' ]
rvstartid = prequest [ ' query-continue ' ] [ ' revisions ' ] [ ' rvstartid ' ]
pparams [ ' rvstartid ' ] = rvstartid
pparams [ ' rvstartid ' ] = rvstartid