mirror of https://github.com/WikiTeam/wikiteam
Support Unicode usernames etc. in makeXmlFromPage()
Test case: Titles saved at... 39fanficwikiacom-20180521-titles.txt 377 page titles loaded http://39fanfic.wikia.com/api.php Getting the XML header from the API Retrieving the XML for every page from the beginning 30 namespaces found Exporting revisions from namespace 0 Warning. Could not use allrevisions, wiki too old. 1 more revisions exported Traceback (most recent call last): File "./dumpgenerator.py", line 2291, in <module> main() File "./dumpgenerator.py", line 2283, in main createNewDump(config=config, other=other) File "./dumpgenerator.py", line 1849, in createNewDump generateXMLDump(config=config, titles=titles, session=other['session']) File "./dumpgenerator.py", line 732, in generateXMLDump for xml in getXMLRevisions(config=config, session=session): File "./dumpgenerator.py", line 861, in getXMLRevisions yield makeXmlFromPage(pages[page]) File "./dumpgenerator.py", line 880, in makeXmlFromPage E.username(str(rev['user'])), UnicodeEncodeError: 'ascii' codec can't encode characters in position 1-3: ordinal not in range(128)pull/319/head
parent
3df2513e67
commit
bbcafdf869
Loading…
Reference in New Issue