// ==UserScript== // @name 视频资源聚合搜索器 // @namespace http://tampermonkey.net/ // @version 1.2.0 // @description 聚合搜索多个视频平台的资源,包括B站、YouTube、优酷、爱奇艺、腾讯视频等 // @author WorkBuddy // @match *://*/* // @grant GM_addStyle // @grant GM_openInTab // @grant GM_setValue // @grant GM_getValue // @run-at document-end // ==/UserScript== (function() { 'use strict'; // 配置 const CONFIG = { // 快捷键:Ctrl/Cmd + Shift + V shortcutKey: 'v', // VIP解析接口配置 vipParsers: [ { name: '解析线路1', url: 'https://jx.jsonplayer.com/player/?url={url}' }, { name: '解析线路2', url: 'https://jx.aidouer.net/?url={url}' }, { name: '解析线路3', url: 'https://jx.m3u8.tv/jiexi/?url={url}' }, { name: '解析线路4', url: 'https://jx.playerjy.com/?url={url}' }, { name: '解析线路5', url: 'https://jx.xmflv.com/?url={url}' }, { name: '解析线路6', url: 'https://jx.777jiexi.com/player/?url={url}' }, { name: '解析线路7', url: 'https://jx.bozrc.com:4433/player/?url={url}' }, { name: '解析线路8', url: 'https://jx.m3u8.tv/jiexi/?url={url}' } ], // 搜索引擎配置 searchEngines: [ // 主流视频平台 { name: 'Bilibili', icon: '📺', url: 'https://search.bilibili.com/all?keyword={keyword}', color: '#FB7299', category: 'main', vipParser: true }, { name: 'YouTube', icon: '▶️', url: 'https://www.youtube.com/results?search_query={keyword}', color: '#FF0000', category: 'main', vipParser: false }, { name: '优酷', icon: '👖', url: 'https://so.youku.com/search_video/q_{keyword}', color: '#1E90FF', category: 'main', vipParser: true }, { name: '爱奇艺', icon: '🥝', url: 'https://so.iqiyi.com/so/q_{keyword}', color: '#00BE06', category: 'main', vipParser: true }, { name: '腾讯视频', icon: '🐧', url: 'https://v.qq.com/x/search/?q={keyword}', color: '#00A0FF', category: 'main', vipParser: true }, { name: '芒果TV', icon: '🥭', url: 'https://so.mgtv.com/so?k={keyword}', color: '#FF6600', category: 'main', vipParser: true }, { name: '西瓜视频', icon: '🍉', url: 'https://www.ixigua.com/search/{keyword}', color: '#FF4444', category: 'main', vipParser: false }, { name: '抖音', icon: '🎵', url: 'https://www.douyin.com/search/{keyword}', color: '#000000', category: 'main', vipParser: false }, { name: '快手', icon: '⚡', url: 'https://www.kuaishou.com/search/video?searchKey={keyword}', color: '#FF6600', category: 'main', vipParser: false }, // 动漫平台 { name: 'AcFun', icon: '🅰️', url: 'https://www.acfun.cn/search?keyword={keyword}', color: '#FD4C5D', category: 'anime' }, { name: '樱花动漫', icon: '🌸', url: 'http://www.yinghuadm.cn/search/?wd={keyword}', color: '#FFB7C5', category: 'anime' }, { name: 'AGE动漫', icon: '👑', url: 'https://www.agemys.net/search?query={keyword}', color: '#9B59B6', category: 'anime' }, { name: 'ZzzFun', icon: '💤', url: 'http://www.zzzfun.com/vod_search.html?wd={keyword}', color: '#3498DB', category: 'anime' }, { name: '嘀哩嘀哩', icon: '🌐', url: 'https://www.dilidili.tv/search/?wd={keyword}', color: '#00CED1', category: 'anime' }, // 影视资源站 { name: '豆瓣', icon: '📖', url: 'https://search.douban.com/movie/subject_search?search_text={keyword}', color: '#00B51D', category: 'resource' }, { name: '电影天堂', icon: '🎬', url: 'https://www.dytt8.net/plus/search.php?kwtype=0&keyword={keyword}', color: '#FF6B6B', category: 'resource' }, { name: 'BT天堂', icon: '🔽', url: 'https://www.bt-tt.com/search/{keyword}.html', color: '#E74C3C', category: 'resource' }, { name: '片库', icon: '📚', url: 'https://www.pianku.tv/search.html?wd={keyword}', color: '#F39C12', category: 'resource' }, { name: '茶杯狐', icon: '🦊', url: 'https://www.cupfox.app/search?key={keyword}', color: '#E67E22', category: 'resource' }, { name: 'LIBVIO', icon: '📀', url: 'https://www.libvio.fun/search/-------------.html?wd={keyword}', color: '#1ABC9C', category: 'resource' }, { name: '555电影', icon: '🎭', url: 'https://www.555dy1.com/vodsearch/-------------.html?wd={keyword}', color: '#9B59B6', category: 'resource' }, { name: '大师兄影视', icon: '👤', url: 'https://www.dsxys.com/search.html?wd={keyword}', color: '#34495E', category: 'resource' }, { name: '厂长资源', icon: '🏭', url: 'https://www.czspp.com/vodsearch/-------------.html?wd={keyword}', color: '#16A085', category: 'resource' }, { name: '在线之家', icon: '🏠', url: 'https://www.zxzj.pro/vodsearch/-------------.html?wd={keyword}', color: '#2980B9', category: 'resource' }, { name: '低端影视', icon: '⬇️', url: 'https://ddys.art/search/{keyword}/', color: '#7F8C8D', category: 'resource' }, // 网盘搜索 { name: '阿里云盘搜索', icon: '☁️', url: 'https://www.alipanx.com/search?keyword={keyword}', color: '#FF6A00', category: 'cloud' }, { name: '小兔搜搜', icon: '🐰', url: 'https://www.xuesousou.net/search?keyword={keyword}', color: '#FF85A2', category: 'cloud' }, { name: '猫狸盘搜', icon: '🐱', url: 'https://www.alipansou.com/search?keyword={keyword}', color: '#FF6B9D', category: 'cloud' }, // 字幕组 { name: '人人影视', icon: '👥', url: 'https://www.YYeTs.com/search?keyword={keyword}', color: '#3498DB', category: 'subtitle' }, { name: 'SubHD', icon: '📝', url: 'https://subhd.tv/search/{keyword}', color: '#27AE60', category: 'subtitle' } ] }; // 创建样式 GM_addStyle(` #video-search-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(5px); z-index: 999999; display: none; justify-content: center; align-items: flex-start; padding-top: 100px; animation: fadeIn 0.2s ease; } #video-search-overlay.active { display: flex; } #video-search-container { background: linear-gradient(135deg, #1a1a2e 0%, #16213e 100%); border-radius: 20px; padding: 30px; width: 90%; max-width: 800px; box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5); animation: slideDown 0.3s ease; border: 1px solid rgba(255, 255, 255, 0.1); } #video-search-header { display: flex; align-items: center; margin-bottom: 20px; } #video-search-header h2 { color: #fff; margin: 0; font-size: 20px; display: flex; align-items: center; gap: 10px; } #video-search-close { margin-left: auto; background: none; border: none; color: #888; font-size: 24px; cursor: pointer; padding: 0; width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: 50%; transition: all 0.2s; } #video-search-close:hover { background: rgba(255, 255, 255, 0.1); color: #fff; } #video-search-input-wrapper { position: relative; margin-bottom: 25px; } #video-search-input { width: 100%; padding: 18px 25px; font-size: 18px; border: 2px solid rgba(255, 255, 255, 0.1); border-radius: 15px; background: rgba(0, 0, 0, 0.3); color: #fff; outline: none; transition: all 0.3s; box-sizing: border-box; } #video-search-input:focus { border-color: #FB7299; background: rgba(0, 0, 0, 0.5); box-shadow: 0 0 20px rgba(251, 114, 153, 0.3); } #video-search-input::placeholder { color: #666; } #video-search-shortcut-hint { position: absolute; right: 15px; top: 50%; transform: translateY(-50%); color: #666; font-size: 12px; background: rgba(255, 255, 255, 0.1); padding: 4px 8px; border-radius: 6px; } #video-search-engines { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; max-height: 400px; overflow-y: auto; padding-right: 10px; } #video-search-engines::-webkit-scrollbar { width: 6px; } #video-search-engines::-webkit-scrollbar-track { background: rgba(255, 255, 255, 0.05); border-radius: 3px; } #video-search-engines::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.2); border-radius: 3px; } #video-search-engines::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, 0.3); } .video-search-category { grid-column: 1 / -1; color: #888; font-size: 13px; font-weight: 600; margin-top: 15px; margin-bottom: 5px; padding-left: 5px; text-transform: uppercase; letter-spacing: 1px; } .video-search-category:first-of-type { margin-top: 0; } .video-search-engine-btn { display: flex; align-items: center; gap: 10px; padding: 15px 18px; border: none; border-radius: 12px; background: rgba(255, 255, 255, 0.05); color: #fff; cursor: pointer; transition: all 0.3s; font-size: 14px; font-weight: 500; text-align: left; border: 1px solid rgba(255, 255, 255, 0.05); } .video-search-engine-btn:hover { transform: translateY(-3px); background: rgba(255, 255, 255, 0.1); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3); } .video-search-engine-btn .engine-icon { font-size: 20px; width: 30px; text-align: center; } .video-search-engine-btn .engine-name { flex: 1; } .video-search-engine-btn.all-search { grid-column: 1 / -1; justify-content: center; background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); font-size: 16px; padding: 18px; } .video-search-engine-btn.all-search:hover { background: linear-gradient(135deg, #764ba2 0%, #667eea 100%); box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4); } .video-search-all-group { grid-column: 1 / -1; display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 10px; } .video-search-engine-btn.all-search.main { background: linear-gradient(135deg, #667eea 0%, #764ba2 100%); } .video-search-engine-btn.all-search.anime { background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%); } .video-search-engine-btn.all-search.resource { background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%); } .video-search-engine-btn.all-search.cloud { background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%); } .video-search-engine-btn.all-search.main:hover { background: linear-gradient(135deg, #764ba2 0%, #667eea 100%); box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4); } .video-search-engine-btn.all-search.anime:hover { background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%); box-shadow: 0 10px 30px rgba(245, 87, 108, 0.4); } .video-search-engine-btn.all-search.resource:hover { background: linear-gradient(135deg, #00f2fe 0%, #4facfe 100%); box-shadow: 0 10px 30px rgba(79, 172, 254, 0.4); } .video-search-engine-btn.all-search.cloud:hover { background: linear-gradient(135deg, #38f9d7 0%, #43e97b 100%); box-shadow: 0 10px 30px rgba(67, 233, 123, 0.4); } @keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } } @keyframes slideDown { from { opacity: 0; transform: translateY(-30px); } to { opacity: 1; transform: translateY(0); } } /* 浮动按钮 */ #video-search-floating-btn { position: fixed; bottom: 30px; right: 30px; width: 60px; height: 60px; border-radius: 50%; background: linear-gradient(135deg, #FB7299 0%, #FF6B6B 100%); border: none; color: #fff; font-size: 24px; cursor: pointer; box-shadow: 0 8px 25px rgba(251, 114, 153, 0.4); z-index: 999998; transition: all 0.3s; display: flex; align-items: center; justify-content: center; } #video-search-floating-btn:hover { transform: scale(1.1) rotate(10deg); box-shadow: 0 12px 35px rgba(251, 114, 153, 0.5); } #video-search-floating-btn:active { transform: scale(0.95); } /* VIP解析区域 */ #video-search-vip-section { background: linear-gradient(135deg, rgba(251, 114, 153, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%); border-radius: 15px; padding: 20px; margin-bottom: 20px; border: 1px solid rgba(251, 114, 153, 0.2); } .vip-section-title { color: #FB7299; font-size: 16px; font-weight: 600; margin-bottom: 12px; display: flex; align-items: center; gap: 8px; } .vip-input-wrapper { display: flex; gap: 10px; margin-bottom: 12px; } #vip-video-url { flex: 1; padding: 12px 18px; font-size: 14px; border: 2px solid rgba(251, 114, 153, 0.3); border-radius: 10px; background: rgba(0, 0, 0, 0.3); color: #fff; outline: none; transition: all 0.3s; } #vip-video-url:focus { border-color: #FB7299; box-shadow: 0 0 15px rgba(251, 114, 153, 0.3); } #vip-video-url::placeholder { color: #666; } #vip-parse-btn { padding: 12px 24px; font-size: 14px; font-weight: 600; border: none; border-radius: 10px; background: linear-gradient(135deg, #FB7299 0%, #FF6B6B 100%); color: #fff; cursor: pointer; transition: all 0.3s; white-space: nowrap; } #vip-parse-btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(251, 114, 153, 0.4); } #vip-parse-btn:active { transform: translateY(0); } .vip-parser-list { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; } .vip-parser-label { color: #888; font-size: 13px; } .vip-parser-option { display: flex; align-items: center; gap: 5px; cursor: pointer; padding: 5px 10px; background: rgba(255, 255, 255, 0.05); border-radius: 20px; transition: all 0.2s; } .vip-parser-option:hover { background: rgba(255, 255, 255, 0.1); } .vip-parser-option input[type="radio"] { cursor: pointer; } .vip-parser-option span { color: #aaa; font-size: 12px; } .vip-parser-option input[type="radio"]:checked + span { color: #FB7299; font-weight: 600; } /* 搜索引擎按钮包装器 */ .video-search-engine-wrapper { position: relative; display: flex; align-items: center; gap: 8px; } .video-search-engine-wrapper .video-search-engine-btn { flex: 1; } .video-search-vip-btn { width: 36px; height: 36px; border: none; border-radius: 8px; background: linear-gradient(135deg, #FFD700 0%, #FFA500 100%); color: #fff; font-size: 16px; cursor: pointer; transition: all 0.3s; display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .video-search-vip-btn:hover { transform: scale(1.1); box-shadow: 0 5px 15px rgba(255, 215, 0, 0.4); } /* 提示信息 */ .video-search-toast { position: fixed; bottom: 100px; left: 50%; transform: translateX(-50%) translateY(100px); background: rgba(0, 0, 0, 0.8); color: #fff; padding: 12px 24px; border-radius: 25px; font-size: 14px; z-index: 1000000; opacity: 0; transition: all 0.3s; } .video-search-toast.show { opacity: 1; transform: translateX(-50%) translateY(0); } `); // 创建DOM元素 function createSearchUI() { // 创建遮罩层 const overlay = document.createElement('div'); overlay.id = 'video-search-overlay'; // 创建搜索容器 const container = document.createElement('div'); container.id = 'video-search-container'; // 头部 const header = document.createElement('div'); header.id = 'video-search-header'; header.innerHTML = `