update scrapinglib

- 优化提取extrafanart,trailer等,直接使用xpath expr,不需要正则匹配
- 优化 getchu 获取cover方法,直接使用og标签信息
- 优化 www.getchu 识别 getchu-id 的资源
- 统一获取 tag 方法,返回值 list
This commit is contained in:
Mathhew
2022-06-15 14:23:49 +08:00
parent eed33408a8
commit 0dda035057
16 changed files with 107 additions and 218 deletions

View File

@@ -47,9 +47,6 @@ class Carib(Parser):
def getCover(self, htmltree):
return f'https://www.caribbeancom.com/moviepages/{self.number}/images/l_l.jpg'
def getTags(self, htmltree):
return self.getTreeAll(htmltree, self.expr_tags)
def getExtrafanart(self, htmltree):
r = []
genres = self.getTreeAll(htmltree, self.expr_extrafanart)
@@ -62,7 +59,6 @@ class Carib(Parser):
return r
def getActorPhoto(self, htmltree):
# return super().getActorPhoto(htmltree)
htmla = htmltree.xpath("//*[@id='moviepages']/div[@class='container']/div[@class='inner-container']/div[@class='movie-info section']/ul/li[@class='movie-spec']/span[@class='spec-content']/a[@itemprop='actor']")
names = htmltree.xpath("//*[@id='moviepages']/div[@class='container']/div[@class='inner-container']/div[@class='movie-info section']/ul/li[@class='movie-spec']/span[@class='spec-content']/a[@itemprop='actor']/span[@itemprop='name']/text()")
t = {}