| 186 | } |
| 187 | return result |
| 188 | def playerContent(self,flag,id,vipFlags): |
| 189 | # https://meijuchong.cc/static/js/playerconfig.js |
| 190 | result = {} |
| 191 | url = 'https://www.voflix.com/play/{0}.html'.format(id) |
| 192 | rsp = self.fetch(url,headers=self.header) |
| 193 | root = self.html(rsp.text) |
| 194 | scripts = root.xpath("//script/text()") |
| 195 | jo = {} |
| 196 | for script in scripts: |
| 197 | if(script.startswith("var player_")): |
| 198 | target = script[script.index('{'):] |
| 199 | jo = json.loads(target) |
| 200 | break; |
| 201 | |
| 202 | parseUrl = 'https://play.shtpin.com/xplay/?url={0}'.format(jo['url']) |
| 203 | parseRsp = self.fetch(parseUrl,headers={'referer':'https://www.voflix.com/'}) |
| 204 | |
| 205 | configStr = self.regStr(parseRsp.text,'var config = ({[\\s\\S]+})') |
| 206 | configJo = json.loads(configStr) |
| 207 | playUrl = 'https://play.shtpin.com/xplay/555tZ4pvzHE3BpiO838.php?tm={0}&url={1}&vkey={2}&token={3}&sign=F4penExTGogdt6U8' |
| 208 | playUrl.format(time.time(),configJo['url'],configJo['vkey'],configJo['token']) |
| 209 | playRsp = self.fetch(playUrl.format(time.time(),configJo['url'],configJo['vkey'],configJo['token']) |
| 210 | ,headers={'referer':'https://www.voflix.com/'}) |
| 211 | playJo = json.loads(playRsp.text) |
| 212 | b64 = playJo['url'][8:] |
| 213 | targetUrl = base64.b64decode(b64)[8:-8].decode() |
| 214 | |
| 215 | result["parse"] = 0 |
| 216 | result["playUrl"] = '' |
| 217 | result["url"] = targetUrl |
| 218 | result["header"] = '' |
| 219 | return result |
| 220 | |
| 221 | config = { |
| 222 | "player": {}, |