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

Method playerContent

plugin/py_huya.py:101–119  ·  view source on GitHub ↗
(self,flag,id,vipFlags)

Source from the content-addressed store, hash-verified

99 result = {}
100 return result
101 def playerContent(self,flag,id,vipFlags):
102 result = {}
103 url = 'https://mp.huya.com/cache.php?m=Live&do=profileRoom&roomid={0}'.format(id)
104 rsp = self.fetch(url)
105 jRoot = json.loads(rsp.text)
106 if jRoot['data']['liveStatus'] != 'ON':
107 return {}
108 jo = jRoot['data']
109 ja = jo['stream']['baseSteamInfoList'][0]['sStreamName']
110 url = 'http://txtest-xp2p.p2p.huya.com/src/' + ja + '.xs?ratio=4000'
111
112 result["parse"] = 0
113 result["playUrl"] = ''
114 result["url"] = url
115 result["header"] = {
116 "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/100.0.4896.127 Safari/537.36"
117 }
118 result["contentType"] = 'video/x-flv'
119 return result
120
121 config = {
122 "player": {},

Callers

nothing calls this directly

Calls 1

fetchMethod · 0.95

Tested by

no test coverage detected