视频解析
// ==UserScript==
// @name 视频解析
// @namespace https://bbs.tampermonkey.net.cn/
// @version 0.1.4
// @description 支持爱奇艺、优酷、腾讯视频、哔哩哔哩网站会员视频解析,安装后在播放页左侧边上会出现一个小可爱,鼠标放上去会自动滑出功能界面,每个按钮代表不同解析接口,解析失败可选择其他按钮试试!!
// @author 张仨
// @match *://v.qq.com/x/cover/*
// @match *://v.qq.com/x/page/*
// @match *://m.qq.com/*
// @match *://www.iqiyi.com/v*
// @match *://m.iqiyi.com/*
// @match *://v.youku.com/v_show/*
// @match *://m.youku.com/*
// @match *://www.bilibili.com/video/*
// @match *://www.bilibili.com/anime/*
// @match *://www.bilibili.com/bangumi/play/*
// @match *://m.bilibili.com/*
// @license MIT
// ==/UserScript==
/*
* 接口皆从网上搜集,非商业用途,侵删!!!
*/
(function () {
'use strict';
var div = document.createElement("div");
if (window == top) {
document.body.appendChild(div);
};
div.innerHTML = `
<div class="box_1">
<div class="box_2">
<h2>ScriptCat</h2>
<p> 成功之路,从脚本猫开始!</p>
</div>
<div class="box_3"></div>
<i class="up-new"></i>
</div>
<style>
.box_1 {
position: fixed;
top: 200px;
left: -170px;
height: 300px;
width: 160px;
padding: 5px;
z-index: 99999;
transition: 1s;
display: flex;
flex-wrap: wrap;
justify-content: center;
border: hidden;
border-radius: 8px;
background: linear-gradient(#17ebe0, #40c4e6, #30b9e2);
}
.box_2 {
width: 95%;
height: 100px;
margin: 6px;
color: #10a1be;
background: linear-gradient(#a4e1f3, #8fdbee, #84dde4);
outline: 2px solid #0ed4f7;
font-size: 13px;
cursor: no-drop;
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.box_3 {
display: flex;
flex-wrap: wrap;
justify-content: center;
}
.box_3 input {
display: none;
}
.box_3 label {
width: 38px;
height: 22px;
margin: 6px;
padding: 6px;
border: hidden;
box-sizing: border-box;
border-radius: 6px;
background: linear-gradient(#b2fefa, #6dd5fa, #0ed2f7);
border-color: #0ed4f7;
outline: 3px solid #0ed2f7;
text-align: center;
cursor: pointer;
font-size: 16px;
line-height: 10px;
color: rgb(17, 56, 230);
}
input[name="drone"]:hover+label {
background: #66ebe4;
}
input[name="drone"]:checked+label {
color: #ff544c;
background: #66ebe4;
}
.box_2 h2 {
position: absolute;
top: 20px;
font-size: 16px;
font-weight: bold;
}
.box_2 p {
position: absolute;
top: 60px;
width: 12em;
white-space: nowrap;
overflow: hidden;
text-shadow: 0 1px hsl(202, 85%, 61%),
0 1px hsl(199, 80%, 56%),
0 2px 4px rgba(34, 156, 226, 0.603);
border-right: 2px solid transparent;
animation: typing 6s;
animation-iteration-count: infinite;
}
@keyframes typing {
from {
width: 0;
}
to {
width: 12em;
}
}
.up-new {
position: absolute;
top: 36px;
width: 30px;
height: 34px;
right: -27px;
z-index: 99999;
cursor: pointer;
background: url(https://www.dpaoz.com/usr/themes/spzac/img/upiocn.png) no-repeat;
}
</style>`
var Interface = [
{ name: "1", id: "awesome1", url: "https://vip.parwix.com:4433/player/?url=" },
{ name: "2", id: "awesome2", url: "https://vip.bljiex.com/?v=" },
{ name: "3", id: "awesome3", url: "https://www.ckplayer.vip/jiexi/?url=" },
{ name: "4", id: "awesome4", url: "https://www.ckmov.vip/api.php?url=" },
{ name: "5", id: "awesome5", url: "https://www.h8jx.com/jiexi.php?url=" },
{ name: "6", id: "awesome6", url: "https://ckmov.ccyjjd.com/ckmov/?url=" },
{ name: "7", id: "awesome7", url: "https://api.jiexi.la/?url=" },
{ name: "8", id: "awesome8", url: "https://vip.laobandq.com/jiexi.php?url=" },
{ name: "9", id: "awesome9", url: "https://jx.m3u8.tv/jiexi/?url=" },
{ name: "✲", id: "awesome10", url: "https://www.playm3u8.cn/jiexi.php?url=" },
{ name: "0", id: "awesome11", url: "https://www.pangujiexi.cc/jiexi.php?url=" },
{ name: "#", id: "awesome12", url: "https://go.yh0523.cn/y.cy?url=" },
{ name: "♫", id: "awesome13", url: "https://www.1717yun.com/jx/ty.php?url=" },
{ name: "✆", id: "awesome14", url: "https://www.8090g.cn/?url=" },
{ name: "✉", id: "awesome15", url: "https://jx.xmflv.com/?url=" }
]
var box1 = document.querySelector('.box_1');
var box3 = document.querySelector('.box_3');
for (var i in Interface) {
let inputs = document.createElement('input');
let label = document.createElement('label');
box3.appendChild(inputs);
box3.appendChild(label);
inputs.type = 'radio';
inputs.name = "drone";
inputs.id = Interface[i].id;
label.htmlFor = Interface[i].id;
label.innerHTML = Interface[i].name;
}
box1.addEventListener('mouseenter', () => {
box1.style.left = "2px";
})
box1.addEventListener('mouseleave', () => {
box1.style.left = "-170px";
})
var player_ids = [
{ url: "v.qq.com", id: "#mod_player" },
{ url: "www.iqiyi.com", id: "#flashbox" },
{ url: "v.youku.com", id: "#ykPlayer" },
{ url: "www.bilibili.com", id: "#player_module" }
]
for (let t in player_ids) {
if (player_ids[t].url == location.host) {
var ids = document.querySelector(player_ids[t].id);
}
}
var iframe = `
<iframe id='iframe-player' frameborder='0' allowfullscreen='true'></iframe>
<style>
#iframe-player{
height: 100%;
width: 100%;
z-index: 99999;
}
</style>`
var labels = document.querySelectorAll('.box_3 label');
for (let h = 0; h < labels.length; h++) {
labels[h].addEventListener('click', () => {
ids.innerHTML = iframe;
var iframe_player = document.querySelector('#iframe-player');
iframe_player.src = Interface[h].url + location.href;
})
}
})();