storyline:add data source airavwiki

This commit is contained in:
lededev
2021-10-31 00:09:05 +08:00
parent 935d12f4dc
commit a50af88409
3 changed files with 45 additions and 8 deletions

View File

@@ -5,6 +5,7 @@ from lxml import etree#need install
import json
from ADC_function import *
from WebCrawler.storyline import getStoryline
import inspect
def getActorPhoto(html):
actors = html.xpath('//div[@class="star-name"]/a')
@@ -60,6 +61,8 @@ def getCID(html):
result = re.sub('/.*?.jpg','',string)
return result
def getOutline(number, title): #获取剧情介绍 多进程并发查询
if any(caller for caller in inspect.stack() if os.path.basename(caller.filename) == 'airav.py'):
return '' # 从airav.py过来的调用不计算outline直接返回避免重复抓取数据拖慢处理速度
return getStoryline(number,title)
def getSeriseJa(html):
x = html.xpath('//span[contains(text(),"シリーズ:")]/../a/text()')