barrust/mediawiki

No wikitext in current PyPI package

nick-robo opened this issue · 1 comments

The following code

from mediawiki import MediaWiki
mw = MediaWiki('https://handwiki.org/wiki/api.php')
p = mw.page('Nikola Tesla') # this gives the wrong page
print(p)
p.wikitext

Gives the following output

<MediaWikiPage 'Tesla (unit)'>
AttributeError: 'MediaWikiPage' object has no attribute 'wikitext'
---------------------------------------------------------------------------
AttributeError                            Traceback (most recent call last)
~/projects/wiki_subsetting/app/classes.py in <module>
      2 mw = MediaWiki('https://handwiki.org/wiki/api.php')
      3 p = mw.page('Nikola Tesla') # this gives the wrong page
----> 4 p.wikitext

AttributeError: 'MediaWikiPage' object has no attribute 'wikitext'

Using version 0.7.0 on linux 64-bit.

The latest documentation states that this attribute should be available (link).

Sorry, haven't had time to push a newer version. It is now updated on PyPi: v0.7.1