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

Method categoryContent

plugin/py_kunyu77.py:49–78  ·  view source on GitHub ↗
(self,tid,pg,filter,extend)

Source from the content-addressed store, hash-verified

47 }
48 return result
49 def categoryContent(self,tid,pg,filter,extend):
50 result = {}
51 if 'type_id' not in extend.keys():
52 extend['type_id'] = tid
53 extend['pagenum'] = pg
54 filterParams = ["type_id", "pagenum"]
55 params = ["", ""]
56 for idx in range(len(filterParams)):
57 fp = filterParams[idx]
58 if fp in extend.keys():
59 params[idx] = '&'+filterParams[idx]+'='+extend[fp]
60 suffix = ''.join(params)
61 url = 'http://api.kunyu77.com/api.php/provide/searchFilter?pagesize=24{0}'.format(suffix)
62 rsp = self.fetch(url,headers=self.header)
63 jo = json.loads(rsp.text)
64 vodList = jo['data']['result']
65 videos = []
66 for vod in vodList:
67 videos.append({
68 "vod_id":vod['id'],
69 "vod_name":vod['title'],
70 "vod_pic":vod['videoCover'],
71 "vod_remarks":vod['msg']
72 })
73 result['list'] = videos
74 result['page'] = pg
75 result['pagecount'] = 9999
76 result['limit'] = 90
77 result['total'] = 999999
78 return result
79 def detailContent(self,array):
80 tid = array[0]
81 url = 'http://api.kunyu77.com/api.php/provide/videoDetail?devid=453CA5D864457C7DB4D0EAA93DE96E66&package=com.sevenVideo.app.android&version=1.8.7&ids={0}'.format(tid)

Callers

nothing calls this directly

Calls 1

fetchMethod · 0.95

Tested by

no test coverage detected