})(i);
myli.innerHTML = apis[i].name;
myul.appendChild(myli)
}
document.body.appendChild(myul);
//让视频区域显示文字,直接解析
//showVipTitle(location.href);
}
}
function showVipTitle(url) {
var titleStr = "视频连接成功!点击选择解析接口";
if (url.indexOf("iqiyi.com") != -1) {
var iframe = document.getElementById('_if');
if (iframe) {
window.location.reload();
return;
};
var i = document.getElementsByClassName('m-video-player-wrap')[0];
if (typeof(i) != 'undefined') {
i.style.height = '220px';
i.style.color = '#fff';
i.style.lineHeight = '15';
i.style.position = 'static';
i.style.paddingTop = '0%';
i.style.background = '#000000';
i.style.textAlign = 'center';
i.innerHTML = '<div>' + titleStr + '</div>';
i.addEventListener('tap',
function() {
loadVip(window.location.href);
})
};
} else if (url.indexOf("v.qq.com") != -1) {
var i = document.getElementsByClassName('site_player')[0];
if (typeof(i) != 'undefined') {
i.style.height = '210px';
i.style.background = '#000000';
i.style.textAlign = 'center';
i.style.color = '#fff';
i.style.lineHeight = '14';
i.innerHTML = '<div>' + titleStr + '</div>';
i.addEventListener('touchstart',
function(e) {
loadVip(window.location.href);
})
};
} else if (url.indexOf("m.le.com") != -1) {
var i = document.getElementsByClassName('playB')[0];
if (typeof(i) != 'undefined') {
i.style.background = '#000000';
i.innerHTML = '<div>' + titleStr + '</div>';
i.style.width = '100%';
i.style.textAlign = 'center';
i.style.lineHeight = '14';
i.style.color = '#fff';
i.addEventListener('touchstart',
function(e) {
loadVip(window.location.href);
});
}
} else if (url.indexOf("youku.com") != -1) {
var i = document.getElementById('playerBox');
if (typeof(i) != 'undefined') {
i.style.background = '#000000';
i.style.color = '#fff';
i.style.textAlign = 'center';
i.style.lineHeight = '15';
i.innerHTML = '<div>' + titleStr + '</div>';
i.addEventListener('touchstart',
function(e) {
loadVip(window.location.href);
});
}
} else if (url.indexOf("mgtv.com") != -1) {
var i = document.getElementsByClassName('video-area')[0];
if (typeof(i) != 'undefined') {
i.style.background = '#000000';
i.style.color = '#fff';
i.style.textAlign = 'center';
i.style.lineHeight = '16';
i.innerHTML = '<div>' + titleStr + '</div>';
i.addEventListener('click',
function(e) {
loadVip(window.location.href);
});
}
} else if (url.indexOf("sohu.com") != -1) {
var i = document.getElementsByClassName('x-player')[0];
var x = document.getElementById('top-poster');
if (typeof(i) != 'undefined') {
i.style.background = '#000000';
i.style.color = '#fff';
i.style.textAlign = 'center';
i.style.lineHeight = '13';
i.innerHTML = '<div>' + titleStr + '</div>';
i.addEventListener('touchstart',
function(e) {
loadVip(window.location.href);
})
} else if (typeof(x) != 'undefined') {
x.style.background = '#000000';
x.style.color = '#fff';
x.style.height = '210px';
x.style.textAlign = 'center';
x.style.lineHeight = '13';
i.innerHTML = '<div>' + titleStr + '</div>';
x.addEventListener('click',
function() {
loadVip(window.location.href);
});
}
} else if (url.indexOf("baofeng.com") != -1) {
var myVideo = document.getElementsByTagName('video')[0];
myVideo.pause();
var i = document.getElementById('videoplayer');
if (typeof(i) != 'undefined') {
i.style.background = '#000000';
i.style.textAlign = 'center';
i.style.color = '#fff';
i.style.lineHeight = '17';
i.innerHTML = '<div>' + titleStr + '</div>';
i.addEventListener('touchstart',
function(e) {
loadVip(window.location.href);
});
}
}
}
function tryGetRealUrl(url) {
var realUrl = url;
try {
realUrl = getRealUrl(url);
} catch(err) {
console.log(err);
}
return realUrl;
}
function getYoukuRealUrl(url) {
var li = document.getElementsByClassName('hot-row-bottom')[0].children[0];
var data = li.getAttribute('data-param');
var s = data.split('svid=');
if (s.length > 1) {
var svid = s[1].split('&')[0];
return 'https://v.youku.com/v_show/id_' + svid + '.html';
}
return url;
}
function getRealUrl(url) {
var dataurl2 = url;
var txurlc = dataurl2.split(":");
var txurl = txurlc[1].slice(0, 12);
var ykurl = txurlc[1].slice(0, 13);
var ykdata = txurlc[1].slice(13);
var funurl = txurlc[1].slice(0, 11);
if (ykurl == '//m.youku.com') {
return getYoukuRealUrl(url);
}
if (ykurl == '//m.youku.com') {
var txurlc = dataurl2.split(":");
var ykurl = txurlc[1].slice(0, 13);
var ykdata = txurlc[1].slice(13);
dataurl2 = 'http://www.youku.com' + ykdata;
} else if (ykurl == '//m.iqiyi.com') {
var txurlc = dataurl2.split(":");
var ykurl = txurlc[1].slice(0, 13);
var ykdata = txurlc[1].slice(13);
dataurl2 = 'https://www.iqiyi.com' + ykdata;
} else if (txurl == '//m.v.qq.com') {
var vid = getParam(dataurl2, "vid");
var cid = getParam(dataurl2, "cid");
var txdata2 = dataurl2.split("?");
var str = "play.html";
if (txdata2[0].slice(txdata2[0].length - str.length) == str) {
if (cid.length > 1) {
dataurl2 = "https://v.qq.com/x/cover/" + cid + ".html";
return dataurl2;
} else if (vid.length == 11) {
return "https://v.qq.com/x/page/" + vid + ".html";
}
}
cid = txdata2[0].slice( - 20, -5);
if (vid.length == 11) {
dataurl2 = 'https://v.qq.com/x/cover/' + cid + '/' + vid + '.html';
} else {
dataurl2 = 'https://v.qq.com/x/cover/' + cid + '.html';
}
} else if (ykurl == '//m.le.com/vp') {
var leurlc = dataurl2.split("_");
var leurl = leurlc[1];
dataurl2 = 'http://www.le.com/ptv/vplay/' + leurl;
}
return dataurl2;
}
function getParam(dataurl2, name) {
return dataurl2.match(new RegExp('[?&]' + name + '=([^?&]+)', 'i')) ? decodeURIComponent(RegExp.$1) : '';
}
function loadVip(url) {

Prev | Next
Pg.: 1 2 3 4


Back to home | File page

Subscribe | Register | Login | N