Merge pull request #1 from yoshiko2/master

将GETCHU设置指定编码(euc-jp)
This commit is contained in:
Trance233
2023-07-09 17:04:19 +08:00
committed by GitHub
8 changed files with 83 additions and 10 deletions

View File

@@ -109,9 +109,15 @@ class wwwGetchu(Parser):
def extradict(self, dic: dict):
""" 额外新增的 headers
"""
dic['headers'] = {'referer': self.detailurl}
dic['headers'] = {'referer': self.detailurl}
return dic
def getTags(self, htmltree):
tags = super().getTags(htmltree)
tags.append("Getchu")
return tags
class dlGetchu(wwwGetchu):
""" 二者基本一致
headers extrafanart 略有区别
@@ -154,7 +160,7 @@ class dlGetchu(wwwGetchu):
def extradict(self, dic: dict):
return dic
def getExtrafanart(self, htmltree):
arts = self.getTreeAll(htmltree, self.expr_extrafanart)
extrafanart = []
@@ -162,3 +168,8 @@ class dlGetchu(wwwGetchu):
i = "https://dl.getchu.com" + i
extrafanart.append(i)
return extrafanart
def getTags(self, htmltree):
tags = super().getTags(htmltree)
tags.append("Getchu")
return tags