This commit is contained in:
qist
2026-05-21 18:24:36 +08:00
parent defd328b8b
commit 651f77d144
3 changed files with 419 additions and 13 deletions
+22 -12
View File
@@ -37,16 +37,22 @@ class Spider(Spider):
self._ua_fallback = "Dalvik/2.1.0 (Linux; U; Android 10)"
self._class_map = [
("最新电影", "/zuixindianying"),
("豆瓣Top250", "/dbtop250"),
("国产剧", "/gcj"),
("美剧", "/meijutt"),
("韩剧", "/hanjutv"),
("日剧", "/riju"),
("番剧", "/fanju"),
("剧场版", "/dongmanjuchangban"),
("海外剧", "/haiwaijuqita"),
("最新电影", "zuixindianying", "/zuixindianying"),
("豆瓣Top250", "dbtop250", "/dbtop250"),
("国产剧", "gcj", "/gcj"),
("美剧", "meijutt", "/meijutt"),
("韩剧", "hanjutv", "/hanjutv"),
("日剧", "riju", "/riju"),
("番剧", "fanju", "/fanju"),
("剧场版", "dongmanjuchangban", "/dongmanjuchangban"),
("海外剧", "haiwaijuqita", "/haiwaijuqita"),
]
self._tid_map = {}
for n, tid, p in self._class_map:
self._tid_map[tid] = p
self._tid_map[n] = p
self._tid_map[p] = p
self._tid_map[p.lstrip("/")] = p
def getName(self):
return "厂长资源"
@@ -236,8 +242,8 @@ class Spider(Spider):
def homeContent(self, filter):
result = {"class": [], "list": []}
for name, path in self._class_map:
result["class"].append({"type_name": name, "type_id": path})
for name, tid, _ in self._class_map:
result["class"].append({"type_name": name, "type_id": tid})
if self._use_api:
return result
@@ -247,7 +253,10 @@ class Spider(Spider):
return result
def homeVideoContent(self):
return {}
if self._use_api:
return {}
html = self._fetch_text(self.host + "/")
return {"list": self._parse_vod_list(html)[:24]}
def categoryContent(self, tid, pg, filter, extend):
pg = int(pg or 1)
@@ -256,6 +265,7 @@ class Spider(Spider):
if self._use_api:
return result
tid = self._tid_map.get(tid, tid)
if tid.startswith("http"):
base = tid
else: