您需要先安装一个扩展,例如 篡改猴、Greasemonkey 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 暴力猴,之后才能安装此脚本。
您需要先安装一个扩展,例如 篡改猴 或 Userscripts ,之后才能安装此脚本。
您需要先安装一款用户脚本管理器扩展,例如 Tampermonkey,才能安装此脚本。
您需要先安装用户脚本管理器扩展后才能安装此脚本。
Print content-type 'application/vnd.apple.mpegurl'
当前为
// ==UserScript== // @name Print requests with content-type 'application/vnd.apple.mpegurl' // @namespace http://your-domain-here/ // @version 10 // @description Print content-type 'application/vnd.apple.mpegurl' // @match http://*/* // @match https://*/* // @grant GM_xmlhttpRequest // @license MIT // ==/UserScript== (function() { 'use strict'; // Find the video player source file URL var scriptUrl = ""; var scriptElements = document.getElementsByTagName("script"); for(var i = 0; i < scriptElements.length; i++) { if(scriptElements[i].src.includes("video-player")) { scriptUrl = scriptElements[i].src; break; } } // Load the video player source file and extract the m3u8 link if(scriptUrl != "") { var xhr = new XMLHttpRequest(); xhr.open("GET", scriptUrl, true); xhr.onreadystatechange = function() { if(xhr.readyState == 4 && xhr.status == 200) { var regex = /source.src\(\"(.+\.m3u8)\"\)/g; var match = regex.exec(xhr.responseText); if(match != null) { var m3u8Link = match[1]; console.log("m3u8 link: " + m3u8Link); // You can use the m3u8 link to download the video using a tool like FFmpeg } } }; xhr.send(); } })();