A set of utilities for processing MediaWiki XML dump data. Currently at version 0.3.8, with irregular releases.
pip install mwxmlVerified import paths — ran on the pinned version, not inferred.
Opens a MediaWiki XML dump file and iterates over pages and revisions.
Always open the dump file with open('file.xml', 'rb').Use: if revision.text is not None: process(revision.text)
Use mwxml.Dump.from_file() instead of mwxml.Dump().
Ensure mwxml is installed (pip install mwxml) and import with import mwxml. Then use mwxml.Dump.
Open the file with open('dump.xml', 'rb') (binary mode).Use binary mode: open('dump.xml', 'rb').