MCPcopy Create free account
hub / github.com/UndCover/PyramidStore / Spider

Class Spider

plugin/py_gimytv.py:8–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

6import json
7
8class Spider(Spider): # 元类 默认的元类 type
9 def getName(self):
10 return "剧迷"
11 def init(self,extend=""):
12 print("============{0}============".format(extend))
13 pass
14 def isVideoFormat(self,url):
15 pass
16 def manualVideoCheck(self):
17 pass
18 def homeContent(self,filter):
19 # https://gimytv.co/
20 result = {}
21 cateManual = {
22 "电影": "movies",
23 "电视剧": "tvseries",
24 "综艺": "tv_show",
25 "动漫": "anime"
26 }
27 classes = []
28 for k in cateManual:
29 classes.append({
30 'type_name':k,
31 'type_id':cateManual[k]
32 })
33 result['class'] = classes
34 if(filter):
35 result['filters'] = self.config['filter']
36 return result
37 def homeVideoContent(self):
38 rsp = self.fetch("https://gimytv.co/",headers=self.header)
39 root = self.html(rsp.text)
40 aList = root.xpath("//ul[@class='myui-vodlist clearfix']/li/div/a")
41 videos = []
42 for a in aList:
43 name = a.xpath("./@title")[0]
44 pic = a.xpath("./@data-original")[0]
45 mark = a.xpath("./span[contains(@class, 'pic-text')]/text()")[0]
46 sid = a.xpath("./@href")[0]
47 sid = self.regStr(sid,"/(\\S+).html")
48 videos.append({
49 "vod_id":sid,
50 "vod_name":name,
51 "vod_pic":pic,
52 "vod_remarks":mark
53 })
54 result = {
55 'list':videos
56 }
57 return result
58 def categoryContent(self,tid,pg,filter,extend):
59 result = {}
60 urlParams = ["", "", "", ""]
61 urlParams[0] = tid
62 urlParams[3] = pg
63 suffix = ''
64 for key in extend:
65 if key == 4:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected