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

Method homeVideoContent

plugin/py_cokemv.py:36–57  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

34 result['filters'] = self.config['filter']
35 return result
36 def homeVideoContent(self):
37 rsp = self.fetch("https://cokemv.me/")
38 root = self.html(rsp.text)
39 aList = root.xpath("//div[@class='main']//div[contains(@class,'module-items')]/a")
40
41 videos = []
42 for a in aList:
43 name = a.xpath('./@title')[0]
44 pic = a.xpath('.//img/@data-original')[0]
45 mark = a.xpath(".//div[@class='module-item-note']/text()")[0]
46 sid = a.xpath("./@href")[0]
47 sid = self.regStr(sid,"/voddetail/(\\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

Callers

nothing calls this directly

Calls 3

fetchMethod · 0.95
htmlMethod · 0.95
regStrMethod · 0.95

Tested by

no test coverage detected