2
.gitignore
vendored
2
.gitignore
vendored
@@ -110,3 +110,5 @@ venv.bak/
|
|||||||
JAV_output/**/*
|
JAV_output/**/*
|
||||||
failed/*
|
failed/*
|
||||||
.vscode/launch.json
|
.vscode/launch.json
|
||||||
|
|
||||||
|
.idea
|
||||||
@@ -67,7 +67,7 @@ def getOutline(html):
|
|||||||
|
|
||||||
|
|
||||||
def getExtrafanart(htmlcode): # 获取剧照
|
def getExtrafanart(htmlcode): # 获取剧照
|
||||||
html_pather = re.compile(r'<div id=\"sample-image-block\"[\s\S]*?<br></div></div>')
|
html_pather = re.compile(r'<div id=\"sample-image-block\"[\s\S]*?<br></div>\n</div>')
|
||||||
html = html_pather.search(htmlcode)
|
html = html_pather.search(htmlcode)
|
||||||
if html:
|
if html:
|
||||||
html = html.group()
|
html = html.group()
|
||||||
|
|||||||
@@ -124,7 +124,7 @@ def getCover_small(html, index=0):
|
|||||||
# javdb sometime returns multiple results
|
# javdb sometime returns multiple results
|
||||||
# DO NOT just get the firt one, get the one with correct index number
|
# DO NOT just get the firt one, get the one with correct index number
|
||||||
try:
|
try:
|
||||||
result = html.xpath("//div[@class='item-image fix-scale-cover']/img/@src")[index]
|
result = html.xpath("//*[@class='movie-list h cols-4']/div/a/div[contains(@class, 'cover')]/img/@src")[index]
|
||||||
if not 'https' in result:
|
if not 'https' in result:
|
||||||
result = 'https:' + result
|
result = 'https:' + result
|
||||||
return result
|
return result
|
||||||
@@ -242,12 +242,12 @@ def main(number):
|
|||||||
# javdb sometime returns multiple results,
|
# javdb sometime returns multiple results,
|
||||||
# and the first elememt maybe not the one we are looking for
|
# and the first elememt maybe not the one we are looking for
|
||||||
# iterate all candidates and find the match one
|
# iterate all candidates and find the match one
|
||||||
urls = html.xpath('//div[@class="item"]/a[@class="box"]/@href')
|
urls = html.xpath('//*[@class="movie-list h cols-4"]/div/a/@href')
|
||||||
# 记录一下欧美的ids ['Blacked','Blacked']
|
# 记录一下欧美的ids ['Blacked','Blacked']
|
||||||
if re.search(r'[a-zA-Z]+\.\d{2}\.\d{2}\.\d{2}', number):
|
if re.search(r'[a-zA-Z]+\.\d{2}\.\d{2}\.\d{2}', number):
|
||||||
correct_url = urls[0]
|
correct_url = urls[0]
|
||||||
else:
|
else:
|
||||||
ids = html.xpath('//div[@class="item"]/a[@class="box"]/div[@class="video-title"]/strong/text()')
|
ids = html.xpath('//*[@class="movie-list h cols-4"]/div/a/div[contains(@class, "video-title")]/strong/text()')
|
||||||
try:
|
try:
|
||||||
correct_url = urls[ids.index(number)]
|
correct_url = urls[ids.index(number)]
|
||||||
except:
|
except:
|
||||||
|
|||||||
Reference in New Issue
Block a user