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

Method categoryContent

plugin/py_huya.py:39–63  ·  view source on GitHub ↗
(self,tid,pg,filter,extend)

Source from the content-addressed store, hash-verified

37 result = {}
38 return result
39 def categoryContent(self,tid,pg,filter,extend):
40 result = {}
41 url = 'http://live.yj1211.work/api/live/getRecommendByPlatformArea?platform=huya&size=20&area={0}&page={1}'.format(tid, pg)
42 rsp = self.fetch(url)
43 content = rsp.text
44 jo = json.loads(content)
45 videos = []
46 vodList = jo['data']
47 for vod in vodList:
48 aid = (vod['roomId']).strip()
49 title = vod['roomName'].strip()
50 img = vod['roomPic'].strip()
51 remark = (vod['ownerName']).strip()
52 videos.append({
53 "vod_id": aid,
54 "vod_name": title,
55 "vod_pic": img,
56 "vod_remarks": remark
57 })
58 result['list'] = videos
59 result['page'] = pg
60 result['pagecount'] = 9999
61 result['limit'] = 90
62 result['total'] = 999999
63 return result
64 def detailContent(self,array):
65 aid = array[0]
66 url = "http://live.yj1211.work/api/live/getRoomInfo?platform=huya&roomId={0}".format(aid)

Callers

nothing calls this directly

Calls 1

fetchMethod · 0.95

Tested by

no test coverage detected