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

Method playerContent

plugin/py_cctv.py:116–138  ·  view source on GitHub ↗
(self,flag,id,vipFlags)

Source from the content-addressed store, hash-verified

114 }
115 return result
116 def playerContent(self,flag,id,vipFlags):
117 result = {}
118 rsp = self.fetch(id,headers=self.header)
119 content = rsp.text.strip()
120 arr = content.split('\n')
121 urlPrefix = self.regStr(id,'(http[s]?://[a-zA-z0-9.]+)/')
122
123 subUrl = arr[-1].split('/')
124 subUrl[3] = '1200'
125 subUrl[-1] = '1200.m3u8'
126 hdUrl = urlPrefix + '/'.join(subUrl)
127
128 url = urlPrefix + arr[-1]
129
130 hdRsp = self.fetch(hdUrl,headers=self.header)
131 if hdRsp.status_code == 200:
132 url = hdUrl
133
134 result["parse"] = 0
135 result["playUrl"] = ''
136 result["url"] = url
137 result["header"] = ''
138 return result
139
140 config = {
141 "player": {},

Callers

nothing calls this directly

Calls 2

fetchMethod · 0.95
regStrMethod · 0.95

Tested by

no test coverage detected