// ==UserScript== // @name 多平台视频解析下载助手 // @namespace https://example.com/ // @version 1.0 // @description 在抖音、快手、小红书、B站、YouTube、Instagram 视频页面添加下载按钮,解析真实视频地址(无水印) // @author YourName // @match *://*.douyin.com/* // @match *://*.iesdouyin.com/* // @match *://*.kuaishou.com/* // @match *://*.gifshow.com/* // @match *://*.xiaohongshu.com/* // @match *://*.bilibili.com/* // @match *://*.b23.tv/* // @match *://*.youtube.com/* // @match *://youtu.be/* // @match *://*.instagram.com/* // @grant GM_xmlhttpRequest // @grant GM_download // @connect * // ==/UserScript== (function () { 'use strict'; /** * 创建下载按钮 */ function createDownloadButton(url) { const btn = document.createElement('button'); btn.innerText = '⬇ 下载视频'; btn.style.position = 'fixed'; btn.style.top = '20px'; btn.style.right = '20px'; btn.style.zIndex = 99999; btn.style.padding = '10px 15px'; btn.style.background = '#ff4757'; btn.style.color = '#fff'; btn.style.border = 'none'; btn.style.borderRadius = '5px'; btn.style.cursor = 'pointer'; btn.onclick = () => { GM_download(url, `video_${Date.now()}.mp4`); }; document.body.appendChild(btn); } /** * 获取真实视频地址 * 这里用页面内已有的视频标签或API接口 */ function getVideoUrl() { // 1. 尝试直接从