fix getchu

headers extrafanart
This commit is contained in:
Mathhew
2022-06-13 10:01:03 +08:00
parent 4074dcd366
commit e7315e3ffa
2 changed files with 27 additions and 0 deletions

View File

@@ -88,7 +88,17 @@ class wwwGetchu(Parser):
extrafanart.append(i)
return extrafanart
def extradict(self, dic: dict):
""" 额外新增的 headers
"""
dic['headers'] = {'referer': self.detailurl}
return dic
class dlGetchu(wwwGetchu):
""" 二者基本一致
headers extrafanart 略有区别
"""
imagecut = 4
allow_number_change = True
@@ -127,3 +137,14 @@ class dlGetchu(wwwGetchu):
def getCover(self, htmltree):
return "https://dl.getchu.com" + super().getCover(htmltree)
def extradict(self, dic: dict):
return dic
def getExtrafanart(self, htmltree):
arts = self.getTreeAll(htmltree, self.expr_extrafanart)
extrafanart = []
for i in arts:
i = "https://dl.getchu.com" + i
extrafanart.append(i)
return extrafanart