Merge pull request #152 from halo9999/fix-matching-number

Fix matching chinese or japanese as number
This commit is contained in:
Yoshiko 2020-03-08 20:27:45 +08:00 committed by GitHub
commit 73cdd797c5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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: