VideoHelp Forum





Try StreamFab Downloader and download streaming video from Netflix, Amazon!



+ Reply to Thread
Results 1 to 20 of 20
  1. https://docplus.com/videos/the-hunt-for-gaddafi-s-billions-episode-1-132990

    m3u8 is visible but they don't work in yt-dlp or N_m3u8DL-RE

    Code:
    https://api.gizmott.com/api/v1/playlistV2/playlist.m3u8?id=202512041764832323142491&token=RKxmSt/FoQJEFIRMo62AKbcD8sUvfGHQOhGuwjbwPtem04OkixdMLJB49AbYvyBr5KFWIkv1aZ0PEGv6JXXSvQ==&type=video&pubid=50158
    m3u8 seems to be missing the first part of the link, eg the 720p link starts at "playlist~720p.m3u8" and is missing the domain address

    Code:
    #EXTM3U
    #EXT-X-VERSION:4
    #EXT-X-STREAM-INF:BANDWIDTH=800000, CODECS="avc1.64001e, mp4a.40.2", RESOLUTION=640x360, CLOSED-CAPTIONS=NONE
    playlist~360p.m3u8?id=202512041764832323142491&key=RKxmSt%2FFoQJEFIRMo62AKbcD8sUvfGHQOhGuwjbwPtem04OkixdMLJB49AbYvyBr5KFWIkv1aZ0PEGv6JXXSvQ%3D%3D&type=video&pubid=50158&audio=standard&b2b_id=&intro=&outro=
    #EXT-X-STREAM-INF:BANDWIDTH=1400000, CODECS="avc1.64001f, mp4a.40.2", RESOLUTION=852x480, CLOSED-CAPTIONS=NONE
    playlist~480p.m3u8?id=202512041764832323142491&key=RKxmSt%2FFoQJEFIRMo62AKbcD8sUvfGHQOhGuwjbwPtem04OkixdMLJB49AbYvyBr5KFWIkv1aZ0PEGv6JXXSvQ%3D%3D&type=video&pubid=50158&audio=standard&b2b_id=&intro=&outro=
    #EXT-X-STREAM-INF:BANDWIDTH=2800000, CODECS="avc1.64001f, mp4a.40.2", RESOLUTION=1280x720, CLOSED-CAPTIONS=NONE
    playlist~720p.m3u8?id=202512041764832323142491&key=RKxmSt%2FFoQJEFIRMo62AKbcD8sUvfGHQOhGuwjbwPtem04OkixdMLJB49AbYvyBr5KFWIkv1aZ0PEGv6JXXSvQ%3D%3D&type=video&pubid=50158&audio=standard&b2b_id=&intro=&outro=
    Is this some trickery by the webmaster or something?
    Quote Quote  
  2. Many addons for browsers can download your video.

    For example Video Download Helper

    Image
    [Attachment 90583 - Click to enlarge]
    Quote Quote  
  3. Originally Posted by cedric8528 View Post
    Video Download Helper
    Cool I got it with VDH, cheers.

    Would still be interested in knowing how to find the correct link though if anyone knows?
    Quote Quote  
  4. Member
    Join Date
    May 2025
    Location
    Out their somewhere in the land of Kangaroos and Koalas.
    Search PM
    Originally Posted by vidsrme View Post
    Originally Posted by cedric8528 View Post
    Video Download Helper
    Cool I got it with VDH, cheers.

    Would still be interested in knowing how to find the correct link though if anyone knows?

    You need to use the request headers for it work with N_m3u8DL-RE, the following worked for me.

    Code:
    N_m3u8DL-RE -mt "https://api.gizmott.com/api/v1/playlistV2/playlist.m3u8?id=202512041764832323142491&token=OEQef7f/g76c889T7jHDMO0bODsv1z0OnxdWWf3+1rLGp/Yh2iPa1ukooVj+hj0VhCChMjbaLdEmSjBisGzI1w==&type=video&pubid=50158" -M format=mp4 -H 'accept: */*' -H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8,el;q=0.7' -H 'access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjaGVjayI6dHJ1ZSwiaWF0IjoxNzY3MzE3ODU1LCJleHAiOjE3NzUwOTM4NTV9.yBvt5BRepC4GWko8uSSFoDrngdF63VP7hAmJvyTQlwA' -H 'cache-control: no-cache' -H 'channelid: 491' -H 'origin: https://docplus.com' -H 'pragma: no-cache' -H 'priority: u=1, i' -H 'pubid: 50158' -H 'referer: https://docplus.com/' -H 'sec-ch-ua: "Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24"' -H 'sec-ch-ua-mobile: ?0' -H 'sec-ch-ua-platform: "macOS"' -H 'sec-fetch-dest: empty' -H 'sec-fetch-mode: cors' -H 'sec-fetch-site: cross-site' -H 'uid: 5668809' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36' --save-name "Gaddafi"
    Quote Quote  
  5. Originally Posted by CMak View Post
    Originally Posted by vidsrme View Post
    Would still be interested in knowing how to find the correct link though if anyone knows?
    You need to use the request headers for it work with N_m3u8DL-RE, the following worked for me.

    Code:
    N_m3u8DL-RE -mt "https://api.gizmott.com/api/v1/playlistV2/playlist.m3u8?id=202512041764832323142491&token=OEQef7f/g76c889T7jHDMO0bODsv1z0OnxdWWf3+1rLGp/Yh2iPa1ukooVj+hj0VhCChMjbaLdEmSjBisGzI1w==&type=video&pubid=50158" -M format=mp4 -H 'accept: */*' -H 'accept-language: en-GB,en-US;q=0.9,en;q=0.8,el;q=0.7' -H 'access-token: eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjaGVjayI6dHJ1ZSwiaWF0IjoxNzY3MzE3ODU1LCJleHAiOjE3NzUwOTM4NTV9.yBvt5BRepC4GWko8uSSFoDrngdF63VP7hAmJvyTQlwA' -H 'cache-control: no-cache' -H 'channelid: 491' -H 'origin: https://docplus.com' -H 'pragma: no-cache' -H 'priority: u=1, i' -H 'pubid: 50158' -H 'referer: https://docplus.com/' -H 'sec-ch-ua: "Google Chrome";v="143", "Chromium";v="143", "Not A(Brand";v="24"' -H 'sec-ch-ua-mobile: ?0' -H 'sec-ch-ua-platform: "macOS"' -H 'sec-fetch-dest: empty' -H 'sec-fetch-mode: cors' -H 'sec-fetch-site: cross-site' -H 'uid: 5668809' -H 'user-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36' --save-name "Gaddafi"
    Thanks bro
    Quote Quote  
  6. The previous solution to include headers is no longer working, can anyone help?

    https://docplus.com/videos/haiti-on-fire

    Code:
    N_m3u8DL-RE "https://api.gizmott.com/api/v1/playlistV2/playlist.m3u8?id=202512031764775491963491&token=iQEI3l4mw0vRvtpwMnLtBZvJ54c1/KqdCDby1b696waPiSwUqk7XBkXByoqH1IqIB6eePo7/dLH65KAPbBE2YA==&type=video&pubid=50158" --header "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0" --header "Referer: https://docplus.com/" --save-name "Haiti On Fire"
    13:39:34.936 ERROR: Init log failed! Access to the path '/usr/bin/Logs' is denied.
    13:39:34.947 INFO : N_m3u8DL-RE (Beta version) 20240630
    13:39:34.947 INFO : Loading URL: https://api.gizmott.com/api/v1/playlistV2/playlist.m3u8?id=202512031764775491963491&token=iQEI3l4mw0vRvtpwMnLtBZvJ54c1/KqdCDby1b696waPiSwUqk7XBkXByoqH1IqIB6eePo7/dLH65KAPbBE2YA==&type=video&pubid=50158
    13:39:35.148 INFO : New version detected! v0.5.1-beta
    13:39:35.436 INFO : Content Matched: HTTP Live Streaming
    13:39:35.436 INFO : Parsing streams...
    13:39:35.436 WARN : Master List detected, try parse all streams
    13:39:35.438 WARN : Writing meta json
    13:39:35.439 INFO : Extracted, there are 3 streams, with 3 basic streams, 0 audio streams, 0 subtitle streams
    13:39:35.439 INFO : Vid 1280x720 | 2800 Kbps | avc1.64001f, mp4a.40.2
    13:39:35.439 INFO : Vid 852x480 | 1400 Kbps | avc1.64001f, mp4a.40.2
    13:39:35.439 INFO : Vid 640x360 | 800 Kbps | avc1.64001e, mp4a.40.2
    13:39:46.082 INFO : Parsing streams...
    13:39:46.566 WARN : Live stream found
    13:39:46.566 INFO : Selected streams:
    13:39:46.566 INFO : Vid 1280x720 | 2800 Kbps | avc1.64001f, mp4a.40.2 | | ~00m00s
    13:39:46.566 WARN : Writing meta json
    13:39:46.566 INFO : Save Name: Haiti On Fire
    13:39:46.567 ERROR: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
    Quote Quote  
  7. Originally Posted by vidsrme View Post
    The previous solution to include headers is no longer working, can anyone help?

    https://docplus.com/videos/haiti-on-fire

    Code:
    N_m3u8DL-RE "https://api.gizmott.com/api/v1/playlistV2/playlist.m3u8?id=202512031764775491963491&token=iQEI3l4mw0vRvtpwMnLtBZvJ54c1/KqdCDby1b696waPiSwUqk7XBkXByoqH1IqIB6eePo7/dLH65KAPbBE2YA==&type=video&pubid=50158" --header "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0" --header "Referer: https://docplus.com/" --save-name "Haiti On Fire"
    13:39:34.936 ERROR: Init log failed! Access to the path '/usr/bin/Logs' is denied.
    13:39:34.947 INFO : N_m3u8DL-RE (Beta version) 20240630
    13:39:34.947 INFO : Loading URL: https://api.gizmott.com/api/v1/playlistV2/playlist.m3u8?id=202512031764775491963491&token=iQEI3l4mw0vRvtpwMnLtBZvJ54c1/KqdCDby1b696waPiSwUqk7XBkXByoqH1IqIB6eePo7/dLH65KAPbBE2YA==&type=video&pubid=50158
    13:39:35.148 INFO : New version detected! v0.5.1-beta
    13:39:35.436 INFO : Content Matched: HTTP Live Streaming
    13:39:35.436 INFO : Parsing streams...
    13:39:35.436 WARN : Master List detected, try parse all streams
    13:39:35.438 WARN : Writing meta json
    13:39:35.439 INFO : Extracted, there are 3 streams, with 3 basic streams, 0 audio streams, 0 subtitle streams
    13:39:35.439 INFO : Vid 1280x720 | 2800 Kbps | avc1.64001f, mp4a.40.2
    13:39:35.439 INFO : Vid 852x480 | 1400 Kbps | avc1.64001f, mp4a.40.2
    13:39:35.439 INFO : Vid 640x360 | 800 Kbps | avc1.64001e, mp4a.40.2
    13:39:46.082 INFO : Parsing streams...
    13:39:46.566 WARN : Live stream found
    13:39:46.566 INFO : Selected streams:
    13:39:46.566 INFO : Vid 1280x720 | 2800 Kbps | avc1.64001f, mp4a.40.2 | | ~00m00s
    13:39:46.566 WARN : Writing meta json
    13:39:46.566 INFO : Save Name: Haiti On Fire
    13:39:46.567 ERROR: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
    this worked for me
    Code:
    N_m3u8DL-RE "https://api.gizmott.com/api/v1/playlistV2/playlist.m3u8?id=202512031764775491963491&token=iQEI3l4mw0vRvtpwMnLtBZvJ54c1/KqdCDby1b696waPiSwUqk7XBkXByoqH1IqIB6eePo7/dLH65KAPbBE2YA==&type=video&pubid=50158" --header "access-token:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjaGVjayI6dHJ1ZSwiaWF0IjoxNzY3NjI0MzEyLCJleHAiOjE3NzU0MDAzMTJ9.sf7-vVA9j0OZySHDK-QITFyLvM4BmMYT1ySnBHFeN00" --header "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0" --header "Referer: https://docplus.com/" --header "origin:https://docplus.com" -M format=mkv --save-name "Haiti On Fire"
    just adding the origin header will work as well, no need for access-token
    Quote Quote  
  8. Originally Posted by xangetsue View Post
    just adding the origin header will work as well, no need for access-token
    Ok, cool cheers
    Quote Quote  
  9. Member
    Join Date
    May 2025
    Location
    Poland
    Search Comp PM
    Originally Posted by xangetsue View Post
    Originally Posted by vidsrme View Post
    The previous solution to include headers is no longer working, can anyone help?

    https://docplus.com/videos/haiti-on-fire

    Code:
    N_m3u8DL-RE "https://api.gizmott.com/api/v1/playlistV2/playlist.m3u8?id=202512031764775491963491&token=iQEI3l4mw0vRvtpwMnLtBZvJ54c1/KqdCDby1b696waPiSwUqk7XBkXByoqH1IqIB6eePo7/dLH65KAPbBE2YA==&type=video&pubid=50158" --header "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0" --header "Referer: https://docplus.com/" --save-name "Haiti On Fire"
    13:39:34.936 ERROR: Init log failed! Access to the path '/usr/bin/Logs' is denied.
    13:39:34.947 INFO : N_m3u8DL-RE (Beta version) 20240630
    13:39:34.947 INFO : Loading URL: https://api.gizmott.com/api/v1/playlistV2/playlist.m3u8?id=202512031764775491963491&token=iQEI3l4mw0vRvtpwMnLtBZvJ54c1/KqdCDby1b696waPiSwUqk7XBkXByoqH1IqIB6eePo7/dLH65KAPbBE2YA==&type=video&pubid=50158
    13:39:35.148 INFO : New version detected! v0.5.1-beta
    13:39:35.436 INFO : Content Matched: HTTP Live Streaming
    13:39:35.436 INFO : Parsing streams...
    13:39:35.436 WARN : Master List detected, try parse all streams
    13:39:35.438 WARN : Writing meta json
    13:39:35.439 INFO : Extracted, there are 3 streams, with 3 basic streams, 0 audio streams, 0 subtitle streams
    13:39:35.439 INFO : Vid 1280x720 | 2800 Kbps | avc1.64001f, mp4a.40.2
    13:39:35.439 INFO : Vid 852x480 | 1400 Kbps | avc1.64001f, mp4a.40.2
    13:39:35.439 INFO : Vid 640x360 | 800 Kbps | avc1.64001e, mp4a.40.2
    13:39:46.082 INFO : Parsing streams...
    13:39:46.566 WARN : Live stream found
    13:39:46.566 INFO : Selected streams:
    13:39:46.566 INFO : Vid 1280x720 | 2800 Kbps | avc1.64001f, mp4a.40.2 | | ~00m00s
    13:39:46.566 WARN : Writing meta json
    13:39:46.566 INFO : Save Name: Haiti On Fire
    13:39:46.567 ERROR: Index was out of range. Must be non-negative and less than the size of the collection. (Parameter 'index')
    this worked for me
    Code:
    N_m3u8DL-RE "https://api.gizmott.com/api/v1/playlistV2/playlist.m3u8?id=202512031764775491963491&token=iQEI3l4mw0vRvtpwMnLtBZvJ54c1/KqdCDby1b696waPiSwUqk7XBkXByoqH1IqIB6eePo7/dLH65KAPbBE2YA==&type=video&pubid=50158" --header "access-token:eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJjaGVjayI6dHJ1ZSwiaWF0IjoxNzY3NjI0MzEyLCJleHAiOjE3NzU0MDAzMTJ9.sf7-vVA9j0OZySHDK-QITFyLvM4BmMYT1ySnBHFeN00" --header "User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:146.0) Gecko/20100101 Firefox/146.0" --header "Referer: https://docplus.com/" --header "origin:https://docplus.com" -M format=mkv --save-name "Haiti On Fire"
    just adding the origin header will work as well, no need for access-token
    hey do you know how to generate a token without using the browser properly and download the video with the generated token in n_m3u8dl-re? I'm getting fingerprint not matching error
    Quote Quote  
  10. You can't. The token are signed with a key only the token issuer has. If you need a token, you have to somehow extract it from the website (as a browser does).
    Quote Quote  
  11. Member
    Join Date
    May 2025
    Location
    Poland
    Search Comp PM
    Originally Posted by Obo View Post
    You can't. The token are signed with a key only the token issuer has. If you need a token, you have to somehow extract it from the website (as a browser does).
    is there no way such like a python script to get the token signed? I can generate the token without any issues, there's some request such like validToken too, is it for signing?? It's just the playlist.m3u8 gives fingerprint not matching
    Quote Quote  
  12. Originally Posted by Laxi View Post
    Originally Posted by Obo View Post
    You can't. The token are signed with a key only the token issuer has. If you need a token, you have to somehow extract it from the website (as a browser does).
    is there no way such like a python script to get the token signed? I can generate the token without any issues, there's some request such like validToken too, is it for signing?? It's just the playlist.m3u8 gives fingerprint not matching
    Hello laxi, if possible, from the website: https://docplus.com using Tampermonkey, create a script with a panel to extract the m3u8 & token, then send a command with N_M3U8DL-RE to download the video.

    Here is my script from Tampermonkey that I created on M6REPLAY.FR:
    Image
    [Attachment 90844 - Click to enlarge]
    Quote Quote  
  13. Originally Posted by Laxi View Post
    Originally Posted by Obo View Post
    You can't. The token are signed with a key only the token issuer has. If you need a token, you have to somehow extract it from the website (as a browser does).
    is there no way such like a python script to get the token signed? I can generate the token without any issues, there's some request such like validToken too, is it for signing?? It's just the playlist.m3u8 gives fingerprint not matching
    Widefrog has a script for Docplus that worked up until recently, but it no longer works. I think it only needs a slight tweak to fix it (including headers). I tried to update it myself but had no luck.
    Quote Quote  
  14. Hi, from Tampermonkey here's how to extract m3u8 and added a command to download the video.

    Code:
    // ==UserScript==
    // @name         DocPlus M3U8 Extractor
    // @namespace    https://docplus.com/
    // @version      1.0
    // @description  Extract MASTER playlist.m3u8 and copy N_m3U8DL-RE command
    // @match        https://docplus.com/*
    // @match        https://www.docplus.com/*
    // @grant        GM_setClipboard
    // ==/UserScript==
    
    (function () {
        'use strict';
    
        let m3u8Url = '';
    
        const userAgent = navigator.userAgent;
        const referer = location.origin + '/';
        const origin = location.origin;
    
        /* ================= UTILS ================= */
    
        function isMasterM3U8(url) {
            return (
                typeof url === 'string' &&
                url.includes('/playlist.m3u8') &&
                !url.includes('~')
            );
        }
    
        function getTitle() {
            let t =
                document.querySelector('meta[property="og:title"]')?.content ||
                document.querySelector('h1')?.innerText ||
                document.title ||
                'docplus_video';
    
            return t.replace(/[\\/:*?"<>|]/g, '').trim();
        }
    
        /* ================= UI ================= */
    
        const panel = document.createElement('div');
        panel.style = `
            position: fixed;
            top: 15px;
            right: 15px;
            width: 520px;
            background: #0b0b0b;
            color: #00ff88;
            font-family: monospace;
            font-size: 13px;
            z-index: 999999;
            border: 2px solid #00ff88;
            padding: 12px;
        `;
    
        panel.innerHTML = `
            <div style="font-weight:bold; margin-bottom:6px;">
                DocPlus M3U8 Extractor
            </div>
    
            <div id="statusRow"
                 style="
                    display:flex;
                    justify-content:space-between;
                    align-items:center;
                    margin-top:6px;
                 ">
                <span id="status">⏳ En attente du master m3u8...</span>
                <span id="copyIcon"
                      title="Copier la commande"
                      style="
                        display:none;
                        cursor:pointer;
                        font-size:20px;
                        user-select:none;
                      ">
                    📋
                </span>
            </div>
    
            <pre id="cmd"
                 style="
                    margin-top:10px;
                    white-space:pre-wrap;
                    background:#000;
                    padding:8px;
                    border:1px solid #00ff88;
                    max-height:200px;
                    overflow:auto;
                 ">
            </pre>
        `;
        document.body.appendChild(panel);
    
        /* ================= COMMAND ================= */
    
        function buildCommand() {
            if (!m3u8Url) return;
    
            const title = getTitle();
    
            const cmd =
    `N_m3u8DL-RE "${m3u8Url}" ^
    --header "User-Agent:${userAgent}" ^
    --header "Referer:${referer}" ^
    --header "Origin:${origin}" ^
    -M format=mkv --save-name "${title}"`;
    
            document.getElementById('cmd').textContent = cmd;
            document.getElementById('status').textContent =
                '✅ MASTER playlist.m3u8 détecté';
    
            const copyIcon = document.getElementById('copyIcon');
            copyIcon.style.display = 'inline';
        }
    
        document.getElementById('copyIcon').onclick = () => {
            GM_setClipboard(
                document.getElementById('cmd').textContent.replace(/\^\n/g, ' ')
            );
        };
    
        /* ================= FETCH HOOK ================= */
    
        const realFetch = window.fetch;
        window.fetch = async function (...args) {
            const response = await realFetch.apply(this, args);
    
            try {
                const url = args[0]?.url || args[0];
                if (isMasterM3U8(url) && !m3u8Url) {
                    m3u8Url = url;
                    buildCommand();
                }
            } catch (e) {}
    
            return response;
        };
    
        /* ================= XHR HOOK ================= */
    
        const open = XMLHttpRequest.prototype.open;
        XMLHttpRequest.prototype.open = function (method, url) {
            this._url = url;
            return open.apply(this, arguments);
        };
    
        const send = XMLHttpRequest.prototype.send;
        XMLHttpRequest.prototype.send = function () {
            this.addEventListener('load', () => {
                if (isMasterM3U8(this._url) && !m3u8Url) {
                    m3u8Url = this._url;
                    buildCommand();
                }
            });
            return send.apply(this, arguments);
        };
    
    })();
    Image
    [Attachment 90856 - Click to enlarge]

    Image
    [Attachment 90857 - Click to enlarge]


    Here is a simple way to download videos from docplus.com.
    Quote Quote  
  15. Originally Posted by sesamap159 View Post
    Hi, from Tampermonkey here's how to extract m3u8 and added a command to download the video.

    Code:
    // ==UserScript==
    Image
    [Attachment 90856 - Click to enlarge]
    It doesnt seem to be working in greasemonkey, nothing happens...

    Image
    [Attachment 90867 - Click to enlarge]
    Quote Quote  
  16. It works very well with Firefox using Tampermonkey; I even tried it from the first link: https://docplus.com/videos/the-hunt-for-gaddafi-s-billions-episode-1-132990

    Image
    [Attachment 90868 - Click to enlarge]
    Quote Quote  
  17. Originally Posted by sesamap159 View Post
    It works very well with Firefox using Tampermonkey; I even tried it from the first link: https://docplus.com/videos/the-hunt-for-gaddafi-s-billions-episode-1-132990

    Image
    [Attachment 90868 - Click to enlarge]
    Amazing work.. saving the script for future use
    Thanks a lot
    Quote Quote  
  18. Originally Posted by sesamap159 View Post
    It works very well with Firefox using Tampermonkey; I even tried it from the first link: https://docplus.com/videos/the-hunt-for-gaddafi-s-billions-episode-1-132990

    Image
    [Attachment 90868 - Click to enlarge]
    Tampermonkey is closed source, but I tried with violentmonkey and it works, must be some problem with greasemonkey...

    Image
    [Attachment 90869 - Click to enlarge]


    Cheers!
    Quote Quote  
  19. Member
    Join Date
    May 2025
    Location
    Poland
    Search Comp PM
    Originally Posted by sesamap159 View Post
    Hi, from Tampermonkey here's how to extract m3u8 and added a command to download the video.

    Code:
    // ==UserScript==
    Image
    [Attachment 90856 - Click to enlarge]

    Image
    [Attachment 90857 - Click to enlarge]


    Here is a simple way to download videos from docplus.com.
    Thank you so much
    Quote Quote  
  20. I just noticed there was a small error in the video title; at the same time, I changed the color.

    Image
    [Attachment 90879 - Click to enlarge]


    Code:
    // ==UserScript==
    // @name         DocPlus M3U8 Extractor
    // @namespace    https://docplus.com/
    // @version      1.2
    // @description  Extract MASTER playlist.m3u8 and copy N_m3U8DL-RE command
    // @match        https://docplus.com/*
    // @match        https://www.docplus.com/*
    // @grant        GM_setClipboard
    // ==/UserScript==
    
    (function () {
        'use strict';
    
        let m3u8Url = '';
        let lastUrl = location.href;
    
        const userAgent = navigator.userAgent;
        const referer = location.origin + '/';
        const origin = location.origin;
    
        /* ================= UTILS ================= */
    
        function isMasterM3U8(url) {
            return (
                typeof url === 'string' &&
                url.includes('/playlist.m3u8') &&
                !url.includes('~')
            );
        }
    
        function getTitle() {
            let t =
                document.querySelector('h1.videoTitle')?.innerText ||
                document.querySelector('meta[property="og:title"]')?.content ||
                document.querySelector('h1')?.innerText ||
                document.title ||
                'docplus_video';
    
            return t.replace(/[\\/:*?"<>|]/g, '').trim();
        }
    
        function resetState() {
            m3u8Url = '';
            document.getElementById('cmd').textContent = '';
            document.getElementById('status').textContent = '⏳ En attente du master m3u8...';
            document.getElementById('status').style.color = 'yellow';
            document.getElementById('copyIcon').style.display = 'none';
            document.getElementById('copyMsg').style.display = 'none';
        }
    
        /* ================= UI ================= */
    
        const panel = document.createElement('div');
        panel.style = `
            position: fixed;
            top: 15px;
            right: 15px;
            width: 520px;
            background: #0b0b0b;
            color: #00ff88;
            font-family: monospace;
            font-size: 13px;
            z-index: 999999;
            border: 2px solid #00ff88;
            padding: 12px;
        `;
    
        panel.innerHTML = `
            <div style="font-weight:bold; margin-bottom:6px;">
                DocPlus M3U8 Extractor
            </div>
    
            <div id="statusRow"
                 style="
                    display:flex;
                    align-items:center;
                    gap:6px;
                    margin-top:6px;
                 ">
    
                <div id="status"
                     style="color:yellow; margin-right:auto;">
                    ⏳ En attente du master m3u8...
                </div>
    
                <span id="copyMsg"
                      style="
                        display:none;
                        color:#00ff88;
                        font-size:12px;
                        white-space:nowrap;
                      ">
                    ✅ La commande a été copiée
                </span>
    
                <span id="copyIcon"
                      title="Copier la commande"
                      style="
                        display:none;
                        cursor:pointer;
                        font-size:20px;
                        user-select:none;
                      ">
                    ��
                </span>
            </div>
    
            <pre id="cmd"
                 style="
                    margin-top:10px;
                    white-space:pre-wrap;
                    background:#000;
                    padding:8px;
                    border:1px solid #00ff88;
                    max-height:200px;
                    overflow:auto;
                    color: blue;
                    font-family: monospace;
                    font-size: 14px;
                 ">
            </pre>
        `;
    
        document.body.appendChild(panel);
    
        /* ================= COMMAND ================= */
    
        function buildCommand() {
            if (!m3u8Url) return;
    
            const title = getTitle();
            const cmd =
    `N_m3u8DL-RE "${m3u8Url}" \
    --header "User-Agent:${userAgent}" \
    --header "Referer:${referer}" \
    --header "Origin:${origin}" \
    -M format=mkv \
    --save-name "${title}"`;
    
            document.getElementById('cmd').textContent = cmd;
            document.getElementById('status').textContent = '✅ MASTER playlist.m3u8 détecté';
            document.getElementById('status').style.color = 'red';
            document.getElementById('copyIcon').style.display = 'inline';
        }
    
        document.getElementById('copyIcon').onclick = () => {
            GM_setClipboard(
                document.getElementById('cmd').textContent.replace(/\n/g, ' ')
            );
    
            const msg = document.getElementById('copyMsg');
            msg.style.display = 'inline';
    
            setTimeout(() => {
                msg.style.display = 'none';
            }, 2000);
        };
    
        /* ================= FETCH HOOK ================= */
    
        const realFetch = window.fetch;
        window.fetch = async function (...args) {
            const response = await realFetch.apply(this, args);
            try {
                const url = args[0]?.url || args[0];
                if (isMasterM3U8(url) && !m3u8Url) {
                    m3u8Url = url;
                    buildCommand();
                }
            } catch (e) {}
            return response;
        };
    
        /* ================= XHR HOOK ================= */
    
        const open = XMLHttpRequest.prototype.open;
        XMLHttpRequest.prototype.open = function (method, url) {
            this._url = url;
            return open.apply(this, arguments);
        };
    
        const send = XMLHttpRequest.prototype.send;
        XMLHttpRequest.prototype.send = function () {
            this.addEventListener('load', () => {
                if (isMasterM3U8(this._url) && !m3u8Url) {
                    m3u8Url = this._url;
                    buildCommand();
                }
            });
            return send.apply(this, arguments);
        };
    
        /* ================= PAGE CHANGE DETECTION ================= */
    
        setInterval(() => {
            if (location.href !== lastUrl) {
                lastUrl = location.href;
                resetState();
            }
        }, 500);
    
    })();
    Problem copying emoticon into the code sharing in <span id="copyIcon" replace �� with https://emojipedia.org/fr/porte-bloc
    Last edited by sesamap159; 18th Jan 2026 at 14:01.
    Quote Quote  
Visit our sponsor! Try DVDFab and backup Blu-rays!