diff --git a/dokuWikiDumper/dump/content/__init__.py b/dokuWikiDumper/dump/content/__init__.py index 665d509..9c88dcc 100644 --- a/dokuWikiDumper/dump/content/__init__.py +++ b/dokuWikiDumper/dump/content/__init__.py @@ -153,6 +153,9 @@ def dump_page(dumpDir: str, except DispositionHeaderMissingError: print(msg_header, ' Revision %s of [[%s]] is empty. (probably deleted)' % ( rev['id'], title)) + else: + print(msg_header, ' Revision %s of [[%s]] failed: %s' % (rev['id'], title, 'Rev id not found (please check ?do=revisions of this page)')) + # time.sleep(1.5) diff --git a/dokuWikiDumper/dump/content/revisions.py b/dokuWikiDumper/dump/content/revisions.py index 3afc349..85a8450 100644 --- a/dokuWikiDumper/dump/content/revisions.py +++ b/dokuWikiDumper/dump/content/revisions.py @@ -298,6 +298,8 @@ def save_page_changes(dumpDir, title: str, revs, child_path, msg_header: str): rev_id = None assert rev_id is not None, 'Cannot parse date: %s' % rev['date'] + assert isinstance(rev_id, str), 'rev_id must be str, not %s' % type(rev_id) + # if rev_id is not unique, plus 1 to it until it is. while rev_id in revidOfPage: rev_id = str(int(rev_id) + 1) diff --git a/dokuWikiDumper/dump/html/html.py b/dokuWikiDumper/dump/html/html.py index f020f54..81a649b 100644 --- a/dokuWikiDumper/dump/html/html.py +++ b/dokuWikiDumper/dump/html/html.py @@ -104,7 +104,8 @@ def dump_html_page(dumpDir, index_of_title, title, doku_url, session: requests.S print(msg_header, ' Revision %s of [[%s]] saved.' % (rev['id'], title)) except requests.HTTPError as e: print(msg_header, ' Revision %s of [[%s]] failed: %s' % (rev['id'], title, e)) - + else: + print(msg_header, ' Revision %s of [[%s]] failed: %s' % (rev['id'], title, 'Rev id not found (please check ?do=revisions of this page)')) save_page_changes(dumpDir=dumpDir, child_path=child_path, title=title, revs=revs, msg_header=msg_header) \ No newline at end of file