Print requests with content-type 'application/vnd.apple.mpegurl'

Print content-type 'application/vnd.apple.mpegurl'

Versión del día 13/04/2023. Echa un vistazo a la versión más reciente.

// ==UserScript==
// @name         Print requests with content-type 'application/vnd.apple.mpegurl'
// @namespace    http://your-domain-here/
// @version      11
// @description  Print content-type 'application/vnd.apple.mpegurl'
// @match        http://*/*
// @match        https://*/*
// @grant        GM_xmlhttpRequest
// @license MIT
// ==/UserScript==

(function() {
    'use strict';
    
    // Define the target node for the MutationObserver
    const targetNode = document.body;
    
    // Create the observer and define what mutations to watch for
    const observer = new MutationObserver((mutations) => {
        mutations.forEach((mutation) => {
            if (mutation.addedNodes && mutation.addedNodes.length > 0) {
                // Check if the added node is the video player source file
                const sourceFile = document.querySelector('#player_html5_api > source');
                if (sourceFile) {
                    // Extract the m3u8 link from the source file and log it in the console
                    const m3u8Link = sourceFile.getAttribute('src');
                    console.log('AIM:', m3u8Link);
                }
            }
        });
    });
    
    // Start the observer
    observer.observe(targetNode, { childList: true, subtree: true });
})();
长期地址
遇到问题?请前往 GitHub 提 Issues。