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

Method categoryContent

plugin/py_czspp.py:60–84  ·  view source on GitHub ↗
(self, tid, pg, filter, extend)

Source from the content-addressed store, hash-verified

58 return result
59
60 def categoryContent(self, tid, pg, filter, extend):
61 result = {}
62 url = 'https://czspp.com/{0}/page/{1}'.format(tid, pg)
63 rsp = self.fetch(url)
64 root = self.html(self.cleanText(rsp.text))
65 aList = root.xpath("//div[contains(@class,'mi_cont')]//ul/li")
66 videos = []
67 for a in aList:
68 name = a.xpath('./a/img/@alt')[0]
69 pic = a.xpath('./a/img/@data-original')[0]
70 mark = a.xpath("./div[@class='hdinfo']/span/text()")[0]
71 sid = a.xpath("./a/@href")[0]
72 sid = self.regStr(sid, "/movie/(\\S+).html")
73 videos.append({
74 "vod_id": sid,
75 "vod_name": name,
76 "vod_pic": pic,
77 "vod_remarks": mark
78 })
79 result['list'] = videos
80 result['page'] = pg
81 result['pagecount'] = 9999
82 result['limit'] = 90
83 result['total'] = 999999
84 return result
85
86 def detailContent(self, array):
87 tid = array[0]

Callers

nothing calls this directly

Calls 4

fetchMethod · 0.95
htmlMethod · 0.95
cleanTextMethod · 0.95
regStrMethod · 0.95

Tested by

no test coverage detected