function main(item) {
const id = item.id || 'xjws';
const n = {
'xjws': 1, // 鏂扮枂鍗
'xjwyzh': 3, // 鏂扮枂缁磋缁煎悎
'xjhyzh': 4, // 鏂扮枂鍝堣缁煎悎
'xjzy': 16, // 鏂扮枂缁艰壓
'xjwyys': 17, // 鏂扮枂缁磋褰辫
'xjjjsh': 18, // 鏂扮枂缁忔祹鐢熸椿
'xjhyzy': 19, // 鏂扮枂鍝堣缁艰壓
'xjwyjjsh': 20, // 鏂扮枂缁磋缁忔祹鐢熸椿
'xjtyjk': 21, // 鏂扮枂浣撹偛鍋ュ悍
'xjxxfw': 22, // 鏂扮枂淇℃伅鏈嶅姟
'xjse': 23 // 鏂扮枂灏戝効棰戦亾
};
const t = Math.round(Date.now());
const sign = ku9.md5(`@#@$AXdm123%)(ds${t}api/TVLiveV100/TVChannelList`);
const url = `https://slstapi.xjtvs.com.cn/api/TVLiveV100/TVChannelList?type=1&stamp=${t}&sign=${sign}`;
const res = ku9.request(url);
if (res.code === 200) {
const data = JSON.parse(res.body).data;
let playurl = '';
for (const v of data) {
if (n[id] === v.Id) {
playurl = v.PlayStreamUrl;
break;
}
}
if (playurl) {
return { url: playurl };
} else {
return { error: "URL Error..." };
}
} else {
return { error: "鑾峰彇鏁版嵁鍑洪敊..." };
}
}



Back to home | File page

Subscribe | Register | Login | N