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

Method detailContent

plugin/py_huya.py:64–97  ·  view source on GitHub ↗
(self,array)

Source from the content-addressed store, hash-verified

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)
67 rsp = self.fetch(url)
68 jRoot = json.loads(rsp.text)
69 jo = jRoot['data']
70 title = jo['roomName']
71 pic = jo['roomPic']
72 desc = str(jo['online'])
73 dire = jo['ownerName']
74 typeName = jo['categoryName']
75 remark = jo['categoryName']
76 vod = {
77 "vod_id": aid,
78 "vod_name": title,
79 "vod_pic": pic,
80 "type_name": typeName,
81 "vod_year": "",
82 "vod_area": "",
83 "vod_remarks": remark,
84 "vod_actor": '在线人数:' + desc,
85 "vod_director": dire,
86 "vod_content": ""
87 }
88 playUrl = '原画' + '${0}#'.format(aid)
89 vod['vod_play_from'] = '虎牙直播'
90 vod['vod_play_url'] = playUrl
91
92 result = {
93 'list': [
94 vod
95 ]
96 }
97 return result
98 def searchContent(self,key,quick):
99 result = {}
100 return result

Callers

nothing calls this directly

Calls 1

fetchMethod · 0.95

Tested by

no test coverage detected