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

Method playerContent

plugin/py_cokemv.py:204–226  ·  view source on GitHub ↗
(self,flag,id,vipFlags)

Source from the content-addressed store, hash-verified

202 "Accept-Encoding":"gzip, deflate"
203 }
204 def playerContent(self,flag,id,vipFlags):
205 url = 'https://cokemv.me/vodplay/{0}.html'.format(id)
206 rsp = self.fetch(url)
207 root = self.html(rsp.text)
208 scripts = root.xpath("//script/text()")
209 jo = {}
210 result = {}
211 for script in scripts:
212 if(script.startswith("var player_")):
213 target = script[script.index('{'):]
214 jo = json.loads(target)
215 break;
216 parseUrl = ""
217 playerConfig = self.config['player']
218 if jo['from'] in self.config['player']:
219 playerConfig = self.config['player'][jo['from']]
220 videoUrl = jo['url']
221 playerUrl = playerConfig['parse']
222 result["parse"] = playerConfig['ps']
223 result["playUrl"] = playerUrl
224 result["url"] = videoUrl
225 result["header"] = json.dumps(self.header)
226 return result
227 def isVideoFormat(self,url):
228 pass
229 def manualVideoCheck(self):

Callers

nothing calls this directly

Calls 2

fetchMethod · 0.95
htmlMethod · 0.95

Tested by

no test coverage detected