fix carib and 1pond number issues

This commit is contained in:
lededev
2021-05-05 12:00:10 +08:00
parent 07026f89f8
commit 10e35cbd92
5 changed files with 147 additions and 33 deletions

View File

@@ -36,12 +36,16 @@ def get_number(debug,filepath: str) -> str:
#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:
filename = filename.replace('PPV', '').replace('ppv', '').replace('--', '-').replace('_', '-')
lower_check = filename.lower()
if 'fc2' in lower_check:
filename = lower_check.replace('ppv', '').replace('--', '-').replace('_', '-').upper()
file_number = re.search(r'\w+-\w+', filename, re.A).group()
tokyo_hot_check = filename.lower()
if "tokyo" in tokyo_hot_check and "hot" in tokyo_hot_check:
file_number = re.search(r'(cz|k|n|red-|se)\d{3,4}', tokyo_hot_check, re.A).group()
if "tokyo" in lower_check and "hot" in lower_check:
file_number = re.search(r'(cz|k|n|red-|se)\d{3,4}', lower_check, re.A).group()
if "carib" in lower_check:
file_number = str(re.search(r'\d{6}(-|_)\d{3}', lower_check, re.A).group()).replace('_', '-')
if "1pon" in lower_check:
file_number = str(re.search(r'\d{6}(-|_)\d{3}', lower_check, re.A).group()).replace('-', '_')
return file_number
else: # 提取不含减号-的番号FANZA CID
# 欧美番号匹配规则
@@ -64,12 +68,16 @@ def get_number(debug,filepath: str) -> str:
#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:
filename = filename.replace('PPV', '').replace('ppv', '').replace('--', '-').replace('_', '-')
lower_check = filename.lower()
if 'fc2' in lower_check:
filename = lower_check.replace('ppv', '').replace('--', '-').replace('_', '-').upper()
file_number = re.search(r'\w+-\w+', filename, re.A).group()
tokyo_hot_check = filename.lower()
if "tokyo" in tokyo_hot_check and "hot" in tokyo_hot_check:
file_number = re.search(r'(cz|k|n|red-|se)\d{3,4}', tokyo_hot_check, re.A).group()
if "tokyo" in lower_check and "hot" in lower_check:
file_number = re.search(r'(cz|k|n|red-|se)\d{3,4}', lower_check, re.A).group()
if "carib" in lower_check:
file_number = str(re.search(r'\d{6}(-|_)\d{3}', lower_check, re.A).group()).replace('_', '-')
if "1pon" in lower_check:
file_number = str(re.search(r'\d{6}(-|_)\d{3}', lower_check, re.A).group()).replace('-', '_')
return file_number
else: # 提取不含减号-的番号FANZA CID
# 欧美番号匹配规则