From 9a3b48140df40264259015cc927b7c48dd041995 Mon Sep 17 00:00:00 2001 From: lededev Date: Tue, 12 Apr 2022 02:28:31 +0800 Subject: [PATCH] =?UTF-8?q?number=5Fparser.py:=E4=B8=8Ecore.py=E5=8A=9F?= =?UTF-8?q?=E8=83=BD=E7=9B=B8=E5=AF=B9=E5=BA=94=EF=BC=8C=5FCD1=E4=B8=8B?= =?UTF-8?q?=E5=88=92=E7=BA=BF=E4=B8=8D=E5=86=8D=E6=94=AF=E6=8C=81=EF=BC=8C?= =?UTF-8?q?=E4=BB=85=E6=94=AF=E6=8C=81-CD1=E8=BF=9E=E5=AD=97=E7=AC=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- number_parser.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/number_parser.py b/number_parser.py index 54400ea..3751cc0 100755 --- a/number_parser.py +++ b/number_parser.py @@ -47,7 +47,7 @@ def get_number(debug: bool, file_path: str) -> str: lower_check = filename.lower() if 'fc2' in lower_check: filename = lower_check.replace('ppv', '').replace('--', '-').replace('_', '-').upper() - filename = re.sub("(-|_)cd\d{1,2}", "", filename, flags=re.IGNORECASE) + filename = re.sub("-cd\d{1,2}", "", filename, flags=re.IGNORECASE) if not re.search("-|_", filename): # 去掉-CD1之后再无-的情况,例如n1012-CD1.wmv return str(re.search(r'\w+', filename[:filename.find('.')], re.A).group()) file_number = str(re.search(r'\w+(-|_)\w+', filename, re.A).group())