Xqt has submitted this change and it was merged.
Change subject: Add page id support ......................................................................
Add page id support
Change-Id: I1399d01caa8f8d4eff4eacd74be99cbbbb1cbd24 --- M wikipedia.py 1 file changed, 8 insertions(+), 1 deletion(-)
Approvals: Xqt: Looks good to me, approved jenkins-bot: Verified
diff --git a/wikipedia.py b/wikipedia.py index a044026..080ceeb 100644 --- a/wikipedia.py +++ b/wikipedia.py @@ -436,6 +436,7 @@ self._ipedit = None self._editTime = None self._startTime = '0' + self._page_id = None # For the Flagged Revisions MediaWiki extension self._revisionId = None self._deletedRevs = None @@ -473,7 +474,12 @@
""" return self._namespace - + def ID(self): + if self._page_id: + return self._page_id + else: + self.get() + return self._page_id def encoding(self): """Return the character encoding used on this Page's wiki Site.""" return self._site.encoding() @@ -824,6 +830,7 @@ output(unicode(pageInfo)) raise ServerError('ServerError: No textarea found in %s' % self)
+ self._page_id = pageInfo['pageid'] self.editRestriction = '' self.moveRestriction = ''