|
本帖最后由 guoma 于 2020-8-15 09:39 编辑
<script type="text/javascript" src="http://libs.baidu.com/jquery/1.7.2/jquery.min.js"></script>
<script>
$.ajaxPrefilter(function (options) {
if (options.crossDomain && jQuery.support.cors) {
var http = (window.location.protocol === 'http:' ? 'http:' : 'https:');
options.url = http + '//cors-anywhere.herokuapp.com/' + options.url;
}
});
$.get('http://play.wlds.net/play/check/ckey.asp?from=local&n=mtvkey',
function(data){
var regt=/'tm'.*?)'/;//此处出现的哭脸用: ' (替换(去掉空格)
var regkey=/'key'.*?)'/;//此处出现的哭脸用: ' (替换(去掉空格)
var t=data.match(regt)[1];
var key=data.match(regkey)[1];
$.get('http://y.wlds.net/ts/chudian/huazhouzonghe.js?tm='+t+'&key='+key+'&from=local',
function(result){
var reg=/"url":"(.*?)"/;
token= result.match(reg)[1].split('token=')[1];
var vid=location.href.split('html?id=')[1];
if(vid=='hzzh'){m3u8='http://huazhou-tv-live1.itouchtv.cn/touchtv/hzzh.m3u8?token='+token};//化州综合
if(vid=='hzgg'){m3u8='http://huazhou-tv-live1.itouchtv.cn/touchtv/hzgg.m3u8?token='+token};//化州公共
if(vid=='ljzh'){m3u8='http://lianjiang-tv-live1.itouchtv.cn/touchtv/ljt.m3u8?token='+token};//廉江综合
if(vid=='zjzh'){m3u8='http://zijin-tv-live1.itouchtv.cn/touchtv/zjt.m3u8?token='+token};//紫金综合
if(vid=='cnzh'){m3u8='http://chaonan-tv-live1.itouchtv.cn/touchtv/chaonan-1.m3u8?token='+token};//潮南综合
if(vid=='hfzh'){m3u8='http://haifeng-tv-live1.itouchtv.cn/touchtv/hft.m3u8?token='+token};//海丰综合
if(vid=='shxwzh'){m3u8='http://sihui-tv-live1.itouchtv.cn/touchtv/shxwzh.m3u8?token='+token};//四会新闻综合
if(vid=='shwhys'){m3u8='http://sihui-tv-live1.itouchtv.cn/touchtv/shwhys.m3u8?token='+token};//四会文化艺术
if(vid=='yczh'){m3u8='http://yangchun-tv-live1.itouchtv.cn/touchtv/yct.m3u8?token='+token};//阳春综合
if(vid=='fgzh'){m3u8='http://fogang-tv-live1.itouchtv.cn/touchtv/fgzh.m3u8?token='+token};//佛冈综合
if(vid=='gnzh'){m3u8='http://guangning-tv-live1.itouchtv.cn/touchtv/gnzh.m3u8?token='+token};//广宁综合
if(vid=='gnsh'){m3u8='http://guangning-tv-live1.itouchtv.cn/touchtv/gnsh.m3u8?token='+token};//广宁生活
if(vid=='pnzh'){m3u8='http://puning-tv-live1.itouchtv.cn/touchtv/pnt.m3u8?token='+token};//普宁电视台
if(vid=='ryzh'){m3u8='http://ruyuan-tv-live1.itouchtv.cn/touchtv/ryt.m3u8?token='+token};//乳源综合
if(vid=='hdzh'){m3u8='http://huidong-tv-live1.itouchtv.cn/touchtv/hdt.m3u8?token='+token};//惠东综合
if(vid=='hyzh'){m3u8='http://huiyang-tv-live1.itouchtv.cn/touchtv/hyt.m3u8?token='+token};//惠阳综合
if(vid=='lzzh'){m3u8='http://lianzhou-tv-live1.itouchtv.cn/touchtv/lzzh.m3u8?token='+token};//连州综合
if(vid=='lzsx'){m3u8='http://lianzhou-tv-live1.itouchtv.cn/touchtv/lzsx.m3u8?token='+token};//连州视讯
if(vid=='ydzh'){m3u8='http://yingde-tv-live1.itouchtv.cn/touchtv/ydxwzh.m3u8?token='+token};//英德综合
if(vid=='hszh'){m3u8='http://heshan-tv-live1.itouchtv.cn/touchtv/hszh.m3u8?token='+token};//鹤山综合
if(vid=='kpzh'){m3u8='http://kaiping-tv-live1.itouchtv.cn/touchtv/kpzh.m3u8?token='+token};//开平综合
if(vid=='kpsh'){m3u8='http://kaiping-tv-live1.itouchtv.cn/touchtv/kpsh.m3u8?token='+token};//开平生活
if(vid=='rpzh'){m3u8='http://raoping-tv-live1.itouchtv.cn/touchtv/rpt.m3u8?token='+token};//饶平综合
if(vid=='lhzh'){m3u8='http://luhe-tv-live1.itouchtv.cn/touchtv/lht.m3u8?token='+token};//陆河综合
if(vid=='xwzh'){m3u8='http://xuwen-tv-live1.itouchtv.cn/touchtv/xwt.m3u8?token='+token};//徐闻综合
if(vid=='gbjd'){m3u8='http://gbjd-tv-live1.itouchtv.cn/touchtv/gbjd.m3u8?token='+token};//工布江达综合
location.href='http://cloud.liveqing.com:10080/LivePlayer.html?videoUrl='+m3u8;//可添加各种m3u8播放器
});
});
</script>
====================================================================
存为:itouchtv.html
调用:itouchtv.html?id=代码中的vid
广东省台、深圳台和市级台用的是官方源,故未列出。
|
|