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

Method categoryContent

plugin/py_gimytv.py:58–93  ·  view source on GitHub ↗
(self,tid,pg,filter,extend)

Source from the content-addressed store, hash-verified

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:
66 suffix = '/by/'+extend[key]
67 else:
68 urlParams[int(key)] = extend[key]
69 params = '-'.join(urlParams)+suffix
70 # https://gimytv.co/genre/tvseries--2022-/by/hits_month.html
71 url = 'https://gimytv.com/genre/{0}.html'.format(params)
72 rsp = self.fetch(url,headers=self.header)
73 root = self.html(rsp.text)
74 aList = root.xpath("//ul[@class='myui-vodlist clearfix']/li/div/a")
75 videos = []
76 for a in aList:
77 name = a.xpath("./@title")[0]
78 pic = a.xpath("./@data-original")[0]
79 mark = a.xpath("./span[contains(@class, 'pic-text')]/text()")[0]
80 sid = a.xpath("./@href")[0]
81 sid = self.regStr(sid,"/(\\S+).html")
82 videos.append({
83 "vod_id":sid,
84 "vod_name":name,
85 "vod_pic":pic,
86 "vod_remarks":mark
87 })
88 result['list'] = videos
89 result['page'] = pg
90 result['pagecount'] = 9999
91 result['limit'] = 90
92 result['total'] = 999999
93 return result
94 def detailContent(self,array):
95 tid = array[0]
96 url = 'https://gimytv.co/{0}.html'.format(tid)

Callers

nothing calls this directly

Calls 3

fetchMethod · 0.95
htmlMethod · 0.95
regStrMethod · 0.95

Tested by

no test coverage detected