From 0b29abe5b7b74cea521d2ae263850c74d150319a Mon Sep 17 00:00:00 2001 From: Castro0o Date: Tue, 7 Apr 2020 17:44:06 +0200 Subject: [PATCH] replacing hyphen --- dumpwiki.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dumpwiki.py b/dumpwiki.py index 80ede08..16f1635 100644 --- a/dumpwiki.py +++ b/dumpwiki.py @@ -34,6 +34,8 @@ with open('login.txt', 'r') as login: # read login user & pwd SLASH = "\u2044" +HYPHEN = "\u2010" + def filenameforpage(p): f = p.name.replace(' ','_').replace('/', SLASH) + '.html' @@ -43,7 +45,7 @@ def filenameforlink(href): href = urlunquote(href) if href.startswith("/sandbox/itchwiki/index.php/"): href = href[len("/sandbox/itchwiki/index.php/"):] - href = href.replace(' ','_').replace('/', SLASH) + '.html' + href = href.replace(' ','_').replace('/', SLASH).replace('‐', HYPHEN) + '.html' href = urlquote(href) return href