From 3f5a7a0f525c21bb75426a1a7350412482be3d7a Mon Sep 17 00:00:00 2001 From: yoshiko2 Date: Tue, 4 May 2021 19:06:31 +0800 Subject: [PATCH] Remove replace '_' to '-' --- number_parser.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/number_parser.py b/number_parser.py index 013ae6e..f010139 100644 --- a/number_parser.py +++ b/number_parser.py @@ -33,7 +33,7 @@ def get_number(debug,filepath: str) -> str: if debug == False: try: if '-' in filepath or '_' in filepath: # 普通提取番号 主要处理包含减号-和_的番号 - filepath = filepath.replace("_", "-") + #filepath = filepath.replace("_", "-") filepath.strip('22-sht.me').strip('-HD').strip('-hd') filename = str(re.sub("\[\d{4}-\d{1,2}-\d{1,2}\] - ", "", filepath)) # 去除文件名中时间 if 'FC2' or 'fc2' in filename: @@ -61,7 +61,7 @@ def get_number(debug,filepath: str) -> str: return elif debug == True: if '-' in filepath or '_' in filepath: # 普通提取番号 主要处理包含减号-和_的番号 - filepath = filepath.replace("_", "-") + #filepath = filepath.replace("_", "-") filepath.strip('22-sht.me').strip('-HD').strip('-hd') filename = str(re.sub("\[\d{4}-\d{1,2}-\d{1,2}\] - ", "", filepath)) # 去除文件名中时间 if 'FC2' or 'fc2' in filename: