// ==UserScript== // @name 全网VIP视频解析助手 // @namespace http://tampermonkey.net/ // @version 1.0.0 // @description 一键解析主流视频网站VIP视频,支持优酷、爱奇艺、腾讯视频、bilibili、芒果TV等。在播放页左侧显示悬浮图标,点击即可切换解析线路。 // @author WorkBuddy // @match *://v.youku.com/* // @match *://www.iqiyi.com/* // @match *://v.qq.com/* // @match *://www.bilibili.com/* // @match *://www.mgtv.com/* // @match *://www.sohu.com/* // @match *://www.pptv.com/* // @match *://www.1905.com/* // @match *://tv.cctv.com/* // @match *://www.le.com/* // @match *://www.acfun.cn/* // @grant GM_setValue // @grant GM_getValue // @grant unsafeWindow // @run-at document-end // @license MIT // ==/UserScript== (function() { 'use strict'; /** * 免费VIP视频解析API接口列表 * 这些接口来自公开的免费API,可能随时失效,建议定期更新 */ const PARSE_APIS = [ { name: '线路1', url: 'https://jx.m3u8.tv/jiexi/?url=', desc: '推荐线路,速度快' }, { name: '线路2', url: 'https://jx.xmflv.com/?url=', desc: '备用线路' }, { name: '线路3', url: 'https://jx.aidouer.net/?url=', desc: '多线路支持' }, { name: '线路4', url: 'https://jx.jsonplayer.com/player/?url=', desc: 'JSON播放器' }, { name: '线路5', url: 'https://jx.aidouer.net/?url=', desc: '高清线路' } ]; /** * 创建CSS样式 */ const style = ` .vip-parse-container { position: fixed; left: 0; top: 50%; transform: translateY(-50%); z-index: 2147483647; font-family: Arial, sans-serif; } .vip-parse-btn { width: 50px; height: 50px; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); border-radius: 0 10px 10px 0; cursor: pointer; display: flex; align-items: center; justify-content: center; box-shadow: 2px 2px 10px rgba(0,0,0,0.3); transition: all 0.3s ease; } .vip-parse-btn:hover { background: linear-gradient(135deg, #764ba2 0%, #667eea 100%); width: 60px; } .vip-parse-icon { color: white; font-size: 24px; font-weight: bold; text-shadow: 1px 1px 2px rgba(0,0,0,0.5); } .vip-parse-tooltip { position: absolute; left: 60px; top: 50%; transform: translateY(-50%); background: rgba(0,0,0,0.8); color: white; padding: 8px 12px; border-radius: 5px; font-size: 12px; white-space: nowrap; opacity: 0; transition: opacity 0.3s ease; pointer-events: none; } .vip-parse-btn:hover .vip-parse-tooltip { opacity: 1; left: 70px; } .vip-parse-menu { position: absolute; left: 60px; top: 50%; transform: translateY(-50%); background: white; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.3); padding: 15px; min-width: 200px; display: none; animation: fadeIn 0.3s ease; } .vip-parse-menu.active { display: block; } @keyframes fadeIn { from { opacity: 0; transform: translateY(-50%) translateX(-10px); } to { opacity: 1; transform: translateY(-50%) translateX(0); } } .vip-parse-menu h3 { margin: 0 0 10px 0; font-size: 16px; color: #333; border-bottom: 2px solid #667eea; padding-bottom: 8px; } .vip-parse-menu .api-list { max-height: 300px; overflow-y: auto; } .vip-parse-menu .api-item { padding: 10px; margin-bottom: 8px; background: #f5f5f5; border-radius: 5px; cursor: pointer; transition: all 0.2s ease; } .vip-parse-menu .api-item:hover { background: #667eea; color: white; transform: translateX(5px); } .vip-parse-menu .api-item.active { background: #667eea; color: white; } .vip-parse-menu .api-name { font-weight: bold; margin-bottom: 3px; } .vip-parse-menu .api-desc { font-size: 11px; opacity: 0.8; } .vip-parse-menu .close-btn { width: 100%; padding: 10px; background: #ff4757; color: white; border: none; border-radius: 5px; cursor: pointer; font-size: 14px; margin-top: 10px; transition: background 0.3s ease; } .vip-parse-menu .close-btn:hover { background: #ff3838; } .vip-parse-menu .current-url { background: #f0f0f0; padding: 8px; border-radius: 5px; font-size: 11px; margin-bottom: 10px; word-break: break-all; max-height: 60px; overflow-y: auto; } .vip-parse-menu .current-url strong { display: block; margin-bottom: 3px; color: #667eea; } `; /** * 初始化脚本 */ function init() { // 添加CSS样式 const styleEl = document.createElement('style'); styleEl.textContent = style; document.head.appendChild(styleEl); // 创建界面 createUI(); // 监听页面变化(处理SPA页面) observeChanges(); } /** * 创建UI界面 */ function createUI() { // 创建容器 const container = document.createElement('div'); container.className = 'vip-parse-container'; // 创建按钮 const btn = document.createElement('div'); btn.className = 'vip-parse-btn'; btn.innerHTML = ` 点击解析VIP视频 `; // 创建菜单 const menu = document.createElement('div'); menu.className = 'vip-parse-menu'; menu.innerHTML = `