Merge pull request #193 from zuozishi/master

fc2-ppv番号识别问题
This commit is contained in:
Yoshiko
2020-04-03 17:50:47 +08:00
committed by GitHub
3 changed files with 15 additions and 1 deletions

12
.vscode/launch.json vendored Normal file
View File

@@ -0,0 +1,12 @@
{
"version": "0.2.0",
"configurations": [
{
"name": "AV_Data_Capture",
"type": "python",
"request": "launch",
"program": "${workspaceFolder}/AV_Data_capture.py",
"console": "integratedTerminal"
}
]
}

View File

@@ -81,6 +81,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-')
filename = filename.replace('-ppv', '').replace('ppv-', '').replace('fc2ppv-', 'FC2-').replace('fc2ppv_', 'FC2-')
file_number = re.search(r'\w+-\w+', filename, re.A).group()
return file_number
else: # 提取不含减号-的番号FANZA CID

View File

@@ -105,6 +105,7 @@ def getYear_fc2com(release):
def main(number):
try:
number = number.replace('FC2-', '').replace('fc2-', '')
htmlcode2 = ADC_function.get_html('https://adult.contents.fc2.com/article/'+number+'/')
htmlcode = ADC_function.get_html('https://fc2club.com//html/FC2-' + number + '.html')
actor = getActor(htmlcode)