Update sites
This commit is contained in:
@@ -221,8 +221,9 @@ class Scraping:
|
|||||||
sources = ["pcolle"]
|
sources = ["pcolle"]
|
||||||
elif "fc2" in lo_file_number:
|
elif "fc2" in lo_file_number:
|
||||||
if "fc2" in sources:
|
if "fc2" in sources:
|
||||||
sources = insert(sources, "msin")
|
sources = ["msin", "fc2"]
|
||||||
sources = insert(sources, "fc2")
|
# sources = insert(sources, "msin")
|
||||||
|
# sources = insert(sources, "fc2")
|
||||||
elif "mgstage" in sources and \
|
elif "mgstage" in sources and \
|
||||||
(re.search(r"\d+\D+", file_number) or "siro" in lo_file_number):
|
(re.search(r"\d+\D+", file_number) or "siro" in lo_file_number):
|
||||||
sources = insert(sources, "mgstage")
|
sources = insert(sources, "mgstage")
|
||||||
@@ -245,7 +246,7 @@ class Scraping:
|
|||||||
todel.append(s)
|
todel.append(s)
|
||||||
for d in todel:
|
for d in todel:
|
||||||
if config.getInstance().debug():
|
if config.getInstance().debug():
|
||||||
print('[!] Remove Source : ' + s)
|
print('[!] Remove Source : ' + d)
|
||||||
sources.remove(d)
|
sources.remove(d)
|
||||||
return sources
|
return sources
|
||||||
|
|
||||||
|
|||||||
@@ -97,3 +97,8 @@ class Dlsite(Parser):
|
|||||||
except:
|
except:
|
||||||
result = ''
|
result = ''
|
||||||
return result
|
return result
|
||||||
|
|
||||||
|
def getTags(self, htmltree):
|
||||||
|
tags = super().getTags(htmltree)
|
||||||
|
tags.append("DLsite")
|
||||||
|
return tags
|
||||||
|
|||||||
@@ -95,9 +95,15 @@ class wwwGetchu(Parser):
|
|||||||
def extradict(self, dic: dict):
|
def extradict(self, dic: dict):
|
||||||
""" 额外新增的 headers
|
""" 额外新增的 headers
|
||||||
"""
|
"""
|
||||||
dic['headers'] = {'referer': self.detailurl}
|
dic['headers'] = {'referer': self.detailurl}
|
||||||
return dic
|
return dic
|
||||||
|
|
||||||
|
def getTags(self, htmltree):
|
||||||
|
tags = super().getTags(htmltree)
|
||||||
|
tags.append("Getchu")
|
||||||
|
return tags
|
||||||
|
|
||||||
|
|
||||||
class dlGetchu(wwwGetchu):
|
class dlGetchu(wwwGetchu):
|
||||||
""" 二者基本一致
|
""" 二者基本一致
|
||||||
headers extrafanart 略有区别
|
headers extrafanart 略有区别
|
||||||
@@ -140,7 +146,7 @@ class dlGetchu(wwwGetchu):
|
|||||||
|
|
||||||
def extradict(self, dic: dict):
|
def extradict(self, dic: dict):
|
||||||
return dic
|
return dic
|
||||||
|
|
||||||
def getExtrafanart(self, htmltree):
|
def getExtrafanart(self, htmltree):
|
||||||
arts = self.getTreeAll(htmltree, self.expr_extrafanart)
|
arts = self.getTreeAll(htmltree, self.expr_extrafanart)
|
||||||
extrafanart = []
|
extrafanart = []
|
||||||
@@ -148,3 +154,8 @@ class dlGetchu(wwwGetchu):
|
|||||||
i = "https://dl.getchu.com" + i
|
i = "https://dl.getchu.com" + i
|
||||||
extrafanart.append(i)
|
extrafanart.append(i)
|
||||||
return extrafanart
|
return extrafanart
|
||||||
|
|
||||||
|
def getTags(self, htmltree):
|
||||||
|
tags = super().getTags(htmltree)
|
||||||
|
tags.append("Getchu")
|
||||||
|
return tags
|
||||||
|
|||||||
@@ -219,7 +219,6 @@ class Parser:
|
|||||||
if tag:
|
if tag:
|
||||||
tags.append(tag)
|
tags.append(tag)
|
||||||
return tags
|
return tags
|
||||||
return [ x.strip() for x in alls if x.strip()]
|
|
||||||
|
|
||||||
def getStudio(self, htmltree):
|
def getStudio(self, htmltree):
|
||||||
return self.getTreeElementbyExprs(htmltree, self.expr_studio, self.expr_studio2)
|
return self.getTreeElementbyExprs(htmltree, self.expr_studio, self.expr_studio2)
|
||||||
|
|||||||
Reference in New Issue
Block a user