Fix: unable to get XML via `Special:Export` (--xml) (#96)

Fixes #93.
pull/475/head
yzqzss 1 year ago committed by GitHub
parent a25be5e1c0
commit e40bf72252
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -102,9 +102,9 @@ def getXMLPage(config: Config=None, title="", verbose=True, session=None):
title_ = title
title_ = re.sub(" ", "_", title_)
# do not convert & into %26, title_ = re.sub('&', '%26', title_)
try:
if config.export:
params = {"title": config.export, "pages": title_, "action": "submit"}
except KeyError:
else:
params = {"title": "Special:Export", "pages": title_, "action": "submit"}
if config.curonly:
params["curonly"] = 1

Loading…
Cancel
Save