Fix matching chinese or japanese as number

This commit is contained in:
halo9999 2020-03-07 20:12:50 +09:00
parent bedd76bc60
commit 9d87d9769d

View File

@ -86,7 +86,7 @@ def getNumber(filepath,absolute_path = False):
filename = str(re.sub("\[\d{4}-\d{1,2}-\d{1,2}\] - ", "", filepath)) # 去除文件名中时间
if 'FC2' or 'fc2' in filename:
filename = filename.replace('-PPV', '').replace('PPV-', '').replace('FC2PPV-','FC2-').replace('FC2PPV_','FC2-')
file_number = re.search('\w+-\w+', filename).group()
file_number = re.search(r'\w+-\w+', filename, re.A).group()
return file_number
else: # 提取不含减号-的番号FANZA CID
try: