Skip to content

Commit

Permalink
fix parser
Browse files Browse the repository at this point in the history
  • Loading branch information
gkroon committed Sep 9, 2024
1 parent 8428da3 commit 052bc87
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions wikiraider/actions/ActionParse.py
Original file line number Diff line number Diff line change
Expand Up @@ -92,9 +92,9 @@ def run(self):
for xml_file in xml_files:
for event, element in xml.etree.cElementTree.iterparse(open(xml_file, 'r', encoding='utf-8', errors='ignore')):
if element.tag.endswith('page'):
title = element.find('.//{http://www.mediawiki.org/xml/export-0.10/}title')
revision = element.find('.//{http://www.mediawiki.org/xml/export-0.10/}revision')
text = revision.find('.//{http://www.mediawiki.org/xml/export-0.10/}text')
title = element.find('.//{http://www.mediawiki.org/xml/export-0.11/}title')
revision = element.find('.//{http://www.mediawiki.org/xml/export-0.11/}revision')
text = revision.find('.//{http://www.mediawiki.org/xml/export-0.11/}text')

element.clear()

Expand Down

0 comments on commit 052bc87

Please sign in to comment.