获取播放地址

admin2021-01-15  1.9K+

import console;
import web.json; 
import web.rest.client
  
_url1 = "https://wx.vzan.com/live/tvchat-405180913?jumpitd=1"
_url2 = "https://wx.vzan.com/live/tvchat-808243?shareuid=0&v=1605360819240#" 
 
var http = web.rest.client();
var getUrl = function(url){
    return http.api(url ,"GET" ,function(ret){
        var hlsUrl = string.match( ret, "hlsUrl\s=\s\'(.+?)\'" );
        var t = string.split(hlsUrl,'/')
        if(t[3] == "i3.vzan.cc"){
            var json = web.json.parse(
                string.match(ret, "RedBag\:\s(\{.+?\})") )
            return string.format(
                "https://i3.vzan.cc/clip/%s/%s/%s"
                ,json.liveId ,json.topicId ,t[#t] )
        } else return hlsUrl;  
     
    })()
}
 
console.log( getUrl(_url1) )
console.log( getUrl(_url2) )  
  
console.pause(true);
转载请注明原文地址: http://www.aardio.net/read-133.html
最新回复(0)
源码分享
aardio源码分享