diff --git a/LunaTranslator/LunaTranslator/myutils/post.py b/LunaTranslator/LunaTranslator/myutils/post.py index c51a6dee..32a1bd4c 100644 --- a/LunaTranslator/LunaTranslator/myutils/post.py +++ b/LunaTranslator/LunaTranslator/myutils/post.py @@ -117,9 +117,9 @@ def _13_f(line): #递增式 line=sorted(saveline, key=len, reverse=True)[0] return line def _1_f(line): - r=re.compile('\{(.*?)/.*?\}') + r=re.compile(r'\{(.*?)/.*?\}') line=r.sub(lambda x:x.groups()[0],line) - r=re.compile('\{(.*?):.*?\}') + r=re.compile(r'\{(.*?):.*?\}') line=r.sub(lambda x:x.groups()[0],line) return line def _4_f(line): diff --git a/LunaTranslator/LunaTranslator/myutils/utils.py b/LunaTranslator/LunaTranslator/myutils/utils.py index 5271dc04..ce791f2f 100644 --- a/LunaTranslator/LunaTranslator/myutils/utils.py +++ b/LunaTranslator/LunaTranslator/myutils/utils.py @@ -34,13 +34,13 @@ def dispatachtask(gamepath): __t=[] for _ in [title,p[-2],p[-1][:-4]]: _=_.replace('(同人ゲーム)','').replace('(18禁ゲーム)','') - _=re.sub('\[RJ(.*?)\]','',_) - _=re.sub('\[\d{4}-?\d{2}\-?\d{2}\]','',_) + _=re.sub(r'\[RJ(.*?)\]','',_) + _=re.sub(r'\[\d{4}-?\d{2}\-?\d{2}\]','',_) __t.append(_) - _=re.sub('\[(.*?)\]','',_) + _=re.sub(r'\[(.*?)\]','',_) if _ !=__t[-1]: __t.append(_) - _=re.sub('\((.*?)\)','',_) + _=re.sub(r'\((.*?)\)','',_) if _ !=__t[-1]: __t.append(_) lst=[] diff --git a/LunaTranslator/LunaTranslator/webresource/githubrelease.py b/LunaTranslator/LunaTranslator/webresource/githubrelease.py index a0220f5d..5b7d6aa0 100644 --- a/LunaTranslator/LunaTranslator/webresource/githubrelease.py +++ b/LunaTranslator/LunaTranslator/webresource/githubrelease.py @@ -41,7 +41,7 @@ if %errorlevel%==0 ( goto waitloop ) timeout 1 -xcopy .\cache\update\LunaTranslator'''+bit+''' .\ /s /e /c /y /h /r +xcopy .\cache\update\LunaTranslator'''+bit+r''' .\ /s /e /c /y /h /r exit ''') windows.ShellExecute(None, "open", 'cache\\update\\update.bat', "", os.path.dirname('.'), windows.SW_HIDE)