Skip to content

Instantly share code, notes, and snippets.

@uahim
Last active October 5, 2025 19:01
Show Gist options
  • Select an option

  • Save uahim/dc82bbedd3b5e6c999af39ab5d45c643 to your computer and use it in GitHub Desktop.

Select an option

Save uahim/dc82bbedd3b5e6c999af39ab5d45c643 to your computer and use it in GitHub Desktop.

Revisions

  1. uahim revised this gist Apr 17, 2025. 1 changed file with 3 additions and 3 deletions.
    6 changes: 3 additions & 3 deletions arte.user.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    // ==UserScript==
    // @name arte stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1.8.1
    // @version 0.1.8.2
    // @description get arte m3u8 stream url
    // @author You
    // @match https://www.arte.tv/de/videos/*
    @@ -39,8 +39,8 @@

    if (document.getElementsByClassName(' ds-rymcfw')[0]) {
    document.getElementsByClassName(' ds-rymcfw')[0].insertBefore(para, null);
    } else if (document.getElementsByClassName(' ds-z8l0xl')[0]) {
    document.getElementsByClassName(' ds-z8l0xl')[0].insertBefore(para, null);
    } else if (document.getElementsByClassName(' ds-2aqyii')[0]) {
    document.getElementsByClassName(' ds-2aqyii')[0].insertBefore(para, null);
    }

    var getJSON = function(url, callback) {
  2. uahim revised this gist Apr 15, 2025. 1 changed file with 12 additions and 5 deletions.
    17 changes: 12 additions & 5 deletions arte.user.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    // ==UserScript==
    // @name arte stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1.7
    // @version 0.1.8.1
    // @description get arte m3u8 stream url
    // @author You
    // @match https://www.arte.tv/de/videos/*
    @@ -25,15 +25,15 @@
    [" | ARTE Concert"," | ARTE"," - Komplette Sendung"," - Programm in voller Länge"," - Film in voller Länge"," - Regarder le film complet"," - Regarder l’émission complète"].forEach((item) => { filmtitle = filmtitle.replace(item, "") });
    filmtitle = filmtitle.replace(/ /g, "_").replace(/[^a-z0-9 \.,_-]/gim, "").replace("_-_","-");

    window.onload = function () {
    document.getElementsByTagName("body")[0].onclick = function () {
    var para = document.createElement("a");
    para.setAttribute('id', 'dwnl');
    para.setAttribute('style', 'font-weight: bold');
    para.setAttribute('style', 'color: white');
    para.setAttribute('class', ' ds-adi73s');
    para.setAttribute('class', ' ds-tgzo04');

    var node = document.createElement("span");
    node.setAttribute('class', ' ds-12ek84r');
    node.setAttribute('class', ' ds-eul86b');
    node.innerText = "Stream URL";
    para.appendChild(node);

    @@ -70,12 +70,19 @@
    url = data.data.attributes.streams[0].url;
    }
    });



    document.getElementById('dwnl').addEventListener("click", function(){
    var test = prompt("stream URL (OK for ffmpeg command or cancel)", url);
    if (test !== null) {
    prompt("ffmpeg command", 'ffmpeg -referer "' + location.href + '" -user_agent "' + window.navigator.userAgent + '" -i "' + url + '" -c copy -bsf:a aac_adtstoasc "' + filmtitle + '.mp4"');
    }
    });



    document.getElementsByTagName("body")[0].onclick = function () {}

    };

    setTimeout('document.getElementsByTagName("body")[0].click()', 2500);
  3. uahim revised this gist Jun 20, 2024. 1 changed file with 3 additions and 6 deletions.
    9 changes: 3 additions & 6 deletions arte.user.js
    Original file line number Diff line number Diff line change
    @@ -8,12 +8,9 @@
    // @match https://www.arte.tv/fr/videos/*
    // ==/UserScript==

    // though it's probably best to get the url or download videos via yt-dlp (youtube-dl successor) or such *,
    // this UserJavaScript provides a simple way to get the m3u8 to feed into VLC or any other player capable
    // of playing streams.
    // however, you could also use an addon for your browser, e.g. The Stream Detector for Firefox **
    // (* my shell script: https://gist.github.com/uahim/9b755b3a728bf790f67488f84f26a3ba )
    // (** https://addons.mozilla.org/en-US/firefox/addon/hls-stream-detector/ )
    // this UserJavaScript provides a simple way to get the m3u8 to feed into VLC or any other player capable of playing streams.
    // though it's probably best to get the url or download videos via yt-dlp or addons such as The Stream Detector for Firefox
    // https://addons.mozilla.org/en-US/firefox/addon/hls-stream-detector/

    var loc = window.location.pathname.split('/');
    var lang = loc[1];
  4. uahim revised this gist Jun 20, 2024. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion arte.user.js
    Original file line number Diff line number Diff line change
    @@ -36,7 +36,7 @@
    para.setAttribute('class', ' ds-adi73s');

    var node = document.createElement("span");
    node.setAttribute('class', ' ds-lbdjjd');
    node.setAttribute('class', ' ds-12ek84r');
    node.innerText = "Stream URL";
    para.appendChild(node);

  5. uahim revised this gist May 3, 2024. No changes.
  6. uahim renamed this gist May 3, 2024. 1 changed file with 9 additions and 9 deletions.
    18 changes: 9 additions & 9 deletions arte_v2.user.js → arte.user.js
    Original file line number Diff line number Diff line change
    @@ -1,8 +1,8 @@
    // ==UserScript==
    // @name arte v2 stream url
    // @name arte stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1.6
    // @description get arte m3u8 stream urls
    // @version 0.1.7
    // @description get arte m3u8 stream url
    // @author You
    // @match https://www.arte.tv/de/videos/*
    // @match https://www.arte.tv/fr/videos/*
    @@ -33,17 +33,17 @@
    para.setAttribute('id', 'dwnl');
    para.setAttribute('style', 'font-weight: bold');
    para.setAttribute('style', 'color: white');
    para.setAttribute('class', ' css-8nrr2d');
    para.setAttribute('class', ' ds-adi73s');

    var node = document.createElement("span");
    node.setAttribute('class', ' css-343yr3');
    node.setAttribute('class', ' ds-lbdjjd');
    node.innerText = "Stream URL";
    para.appendChild(node);

    if (document.getElementsByClassName(' css-rymcfw')[0]) {
    document.getElementsByClassName(' css-rymcfw')[0].insertBefore(para, null);
    } else if (document.getElementsByClassName(' css-z8l0xl')[0]) {
    document.getElementsByClassName(' css-z8l0xl')[0].insertBefore(para, null);
    if (document.getElementsByClassName(' ds-rymcfw')[0]) {
    document.getElementsByClassName(' ds-rymcfw')[0].insertBefore(para, null);
    } else if (document.getElementsByClassName(' ds-z8l0xl')[0]) {
    document.getElementsByClassName(' ds-z8l0xl')[0].insertBefore(para, null);
    }

    var getJSON = function(url, callback) {
  7. uahim revised this gist Nov 20, 2023. 1 changed file with 9 additions and 8 deletions.
    17 changes: 9 additions & 8 deletions arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    // ==UserScript==
    // @name arte v2 stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1.5.7
    // @version 0.1.6
    // @description get arte m3u8 stream urls
    // @author You
    // @match https://www.arte.tv/de/videos/*
    @@ -25,24 +25,25 @@
    var download_url = api_base + id;

    var filmtitle = document.querySelector('meta[property="og:title"]').content;
    filmtitle = filmtitle.replace(" | ARTE", "").replace(" - Film in voller Länge", "").replace(" - Regarder le film complet", "").replace(" - Regarder l’émission complète", "").replace(" - Komplette Sendung", "").replace(/ /g, "_").replace(/[^a-z0-9 \.,_-]/gim, "");
    [" | ARTE Concert"," | ARTE"," - Komplette Sendung"," - Programm in voller Länge"," - Film in voller Länge"," - Regarder le film complet"," - Regarder l’émission complète"].forEach((item) => { filmtitle = filmtitle.replace(item, "") });
    filmtitle = filmtitle.replace(/ /g, "_").replace(/[^a-z0-9 \.,_-]/gim, "").replace("_-_","-");

    window.onload = function () {
    var para = document.createElement("a");
    para.setAttribute('id', 'dwnl');
    para.setAttribute('style', 'font-weight: bold');
    para.setAttribute('style', 'color: white');
    para.setAttribute('class', ' css-84x8ve');
    para.setAttribute('class', ' css-8nrr2d');

    var node = document.createElement("span");
    node.setAttribute('class', ' css-6cz66a');
    node.setAttribute('class', ' css-343yr3');
    node.innerText = "Stream URL";
    para.appendChild(node);

    if (document.getElementsByClassName(' css-1tbohjq')[0]) {
    document.getElementsByClassName(' css-1tbohjq')[0].insertBefore(para, null);
    } else if (document.getElementsByClassName(' css-yt2jfa')[0]) {
    document.getElementsByClassName(' css-yt2jfa')[0].insertBefore(para, null);
    if (document.getElementsByClassName(' css-rymcfw')[0]) {
    document.getElementsByClassName(' css-rymcfw')[0].insertBefore(para, null);
    } else if (document.getElementsByClassName(' css-z8l0xl')[0]) {
    document.getElementsByClassName(' css-z8l0xl')[0].insertBefore(para, null);
    }

    var getJSON = function(url, callback) {
  8. uahim revised this gist Jun 26, 2023. 1 changed file with 10 additions and 9 deletions.
    19 changes: 10 additions & 9 deletions arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -1,17 +1,18 @@
    // ==UserScript==
    // @name arte v2 stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1.5.6
    // @description try to take over the world!
    // @version 0.1.5.7
    // @description get arte m3u8 stream urls
    // @author You
    // @match https://www.arte.tv/de/videos/*
    // @match https://www.arte.tv/fr/videos/*
    // ==/UserScript==

    // though the preferred way is to simply download the content via yt-dlp (youtube-dl successor) or my shell script * or such,
    // this simple UserJS pulls the m3u8-url to feed into vlc or any other player capable of playing streams. however, you could
    // also use an addon for your browser such as The Stream Detector for Firefox **
    // (* https://gist.github.com/uahim/9b755b3a728bf790f67488f84f26a3ba )
    // though it's probably best to get the url or download videos via yt-dlp (youtube-dl successor) or such *,
    // this UserJavaScript provides a simple way to get the m3u8 to feed into VLC or any other player capable
    // of playing streams.
    // however, you could also use an addon for your browser, e.g. The Stream Detector for Firefox **
    // (* my shell script: https://gist.github.com/uahim/9b755b3a728bf790f67488f84f26a3ba )
    // (** https://addons.mozilla.org/en-US/firefox/addon/hls-stream-detector/ )

    var loc = window.location.pathname.split('/');
    @@ -24,7 +25,7 @@
    var download_url = api_base + id;

    var filmtitle = document.querySelector('meta[property="og:title"]').content;
    filmtitle = filmtitle.replace(" | ARTE", "").replace(" - Regarder l’émission complète", "").replace(" - Komplette Sendung", "").replace(/ /g, "_").replace(/[^a-z0-9 \.,_-]/gim, "");
    filmtitle = filmtitle.replace(" | ARTE", "").replace(" - Film in voller Länge", "").replace(" - Regarder le film complet", "").replace(" - Regarder l’émission complète", "").replace(" - Komplette Sendung", "").replace(/ /g, "_").replace(/[^a-z0-9 \.,_-]/gim, "");

    window.onload = function () {
    var para = document.createElement("a");
    @@ -40,7 +41,7 @@

    if (document.getElementsByClassName(' css-1tbohjq')[0]) {
    document.getElementsByClassName(' css-1tbohjq')[0].insertBefore(para, null);
    } else {
    } else if (document.getElementsByClassName(' css-yt2jfa')[0]) {
    document.getElementsByClassName(' css-yt2jfa')[0].insertBefore(para, null);
    }

    @@ -75,7 +76,7 @@
    document.getElementById('dwnl').addEventListener("click", function(){
    var test = prompt("stream URL (OK for ffmpeg command or cancel)", url);
    if (test !== null) {
    prompt("ffmpeg command", 'ffmpeg -referer "' + location.href + '" -user_agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0" -i "' + url + '" -c copy -bsf:a aac_adtstoasc "' + filmtitle + '.mp4"');
    prompt("ffmpeg command", 'ffmpeg -referer "' + location.href + '" -user_agent "' + window.navigator.userAgent + '" -i "' + url + '" -c copy -bsf:a aac_adtstoasc "' + filmtitle + '.mp4"');
    }
    });

  9. uahim revised this gist Jun 26, 2023. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -37,7 +37,7 @@
    node.setAttribute('class', ' css-6cz66a');
    node.innerText = "Stream URL";
    para.appendChild(node);
    // add if/else css-yt2jfa

    if (document.getElementsByClassName(' css-1tbohjq')[0]) {
    document.getElementsByClassName(' css-1tbohjq')[0].insertBefore(para, null);
    } else {
  10. uahim revised this gist Jun 26, 2023. 1 changed file with 4 additions and 3 deletions.
    7 changes: 4 additions & 3 deletions arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -8,10 +8,11 @@
    // @match https://www.arte.tv/fr/videos/*
    // ==/UserScript==

    // though the preferred way is to simply download the content via yt-dlp (youtube-dl successor) or my shell script *,
    // this simple UserJS pulls the m3u8-url to feed into vlc or any other player capable. however, you could also use
    // an addon for your browser such as The Stream Detector for Firefox
    // though the preferred way is to simply download the content via yt-dlp (youtube-dl successor) or my shell script * or such,
    // this simple UserJS pulls the m3u8-url to feed into vlc or any other player capable of playing streams. however, you could
    // also use an addon for your browser such as The Stream Detector for Firefox **
    // (* https://gist.github.com/uahim/9b755b3a728bf790f67488f84f26a3ba )
    // (** https://addons.mozilla.org/en-US/firefox/addon/hls-stream-detector/ )

    var loc = window.location.pathname.split('/');
    var lang = loc[1];
  11. uahim revised this gist Jun 26, 2023. 1 changed file with 5 additions and 0 deletions.
    5 changes: 5 additions & 0 deletions arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -8,6 +8,11 @@
    // @match https://www.arte.tv/fr/videos/*
    // ==/UserScript==

    // though the preferred way is to simply download the content via yt-dlp (youtube-dl successor) or my shell script *,
    // this simple UserJS pulls the m3u8-url to feed into vlc or any other player capable. however, you could also use
    // an addon for your browser such as The Stream Detector for Firefox
    // (* https://gist.github.com/uahim/9b755b3a728bf790f67488f84f26a3ba )

    var loc = window.location.pathname.split('/');
    var lang = loc[1];
    var id = loc[3];
  12. uahim revised this gist Jun 26, 2023. 1 changed file with 7 additions and 4 deletions.
    11 changes: 7 additions & 4 deletions arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,11 @@
    // ==UserScript==
    // @name arte v2 stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1.5.5
    // @version 0.1.5.6
    // @description try to take over the world!
    // @author You
    // @match https://www.arte.tv/de/videos/*
    // @match https://www.arte.tv/fr/videos/*
    // @match https://www.arte.tv/de/arte-concert/*
    // @match https://www.arte.tv/fr/arte-concert/*
    // ==/UserScript==

    var loc = window.location.pathname.split('/');
    @@ -33,7 +31,12 @@
    node.setAttribute('class', ' css-6cz66a');
    node.innerText = "Stream URL";
    para.appendChild(node);
    // add if/else css-yt2jfa
    if (document.getElementsByClassName(' css-1tbohjq')[0]) {
    document.getElementsByClassName(' css-1tbohjq')[0].insertBefore(para, null);
    } else {
    document.getElementsByClassName(' css-yt2jfa')[0].insertBefore(para, null);
    }

    var getJSON = function(url, callback) {

    @@ -70,4 +73,4 @@
    }
    });

    };
    };
  13. uahim revised this gist Jun 25, 2023. 1 changed file with 7 additions and 9 deletions.
    16 changes: 7 additions & 9 deletions arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    // ==UserScript==
    // @name arte v2 stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1.5.4
    // @version 0.1.5.5
    // @description try to take over the world!
    // @author You
    // @match https://www.arte.tv/de/videos/*
    @@ -20,22 +20,20 @@
    var download_url = api_base + id;

    var filmtitle = document.querySelector('meta[property="og:title"]').content;
    filmtitle = filmtitle.replace(" | ARTE", "").replace(/ /g, "_").replace(/[^a-z0-9 \.,_-]/gim, "");
    filmtitle = filmtitle.replace(" | ARTE", "").replace(" - Regarder l’émission complète", "").replace(" - Komplette Sendung", "").replace(/ /g, "_").replace(/[^a-z0-9 \.,_-]/gim, "");

    window.onload = function () {
    var para = document.createElement("a");
    para.setAttribute('id', 'dwnl');
    para.setAttribute('style', 'font-weight: bold');
    para.setAttribute('style', 'color: white');
    para.setAttribute('class', ' css-84x8ve');
    para.setAttribute('style', 'color: white');
    para.setAttribute('class', ' css-84x8ve');


    // var node = document.createTextNode('Stream URL');
    var node = document.createElement("span");
    node.setAttribute('class', ' css-6cz66a');
    node.innerText = "Stream URL";
    node.setAttribute('class', ' css-6cz66a');
    node.innerText = "Stream URL";
    para.appendChild(node);
    document.getElementsByClassName(' css-1tbohjq')[0].insertBefore(para, para.nextSibling);
    document.getElementsByClassName(' css-1tbohjq')[0].insertBefore(para, null);

    var getJSON = function(url, callback) {

  14. uahim revised this gist Jun 25, 2023. 1 changed file with 11 additions and 7 deletions.
    18 changes: 11 additions & 7 deletions arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    // ==UserScript==
    // @name arte v2 stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1.5.3
    // @version 0.1.5.4
    // @description try to take over the world!
    // @author You
    // @match https://www.arte.tv/de/videos/*
    @@ -23,15 +23,19 @@
    filmtitle = filmtitle.replace(" | ARTE", "").replace(/ /g, "_").replace(/[^a-z0-9 \.,_-]/gim, "");

    window.onload = function () {
    var para = document.createElement("span");
    var para = document.createElement("a");
    para.setAttribute('id', 'dwnl');
    para.setAttribute('style', 'font-weight: bold');
    para.setAttribute('style', 'color: white');
    para.setAttribute('class', ' css-d7iwcn');
    para.setAttribute('class', ' css-84x8ve');


    var node = document.createTextNode('Stream URL');
    // var node = document.createTextNode('Stream URL');
    var node = document.createElement("span");
    node.setAttribute('class', ' css-6cz66a');
    node.innerText = "Stream URL";
    para.appendChild(node);
    document.getElementsByClassName(' css-15dgfxu')[0].insertBefore(para, null);
    document.getElementsByClassName(' css-1tbohjq')[0].insertBefore(para, para.nextSibling);

    var getJSON = function(url, callback) {

    @@ -64,8 +68,8 @@
    document.getElementById('dwnl').addEventListener("click", function(){
    var test = prompt("stream URL (OK for ffmpeg command or cancel)", url);
    if (test !== null) {
    prompt("ffmpeg command", 'ffmpeg -referer "' + location.href + '" -user_agent "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0" -i "' + url + '" -c copy -bsf:a aac_adtstoasc "' + filmtitle + '.mp4"');
    prompt("ffmpeg command", 'ffmpeg -referer "' + location.href + '" -user_agent "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Firefox/102.0" -i "' + url + '" -c copy -bsf:a aac_adtstoasc "' + filmtitle + '.mp4"');
    }
    });

    };
    };
  15. uahim revised this gist Jul 3, 2022. 1 changed file with 3 additions and 1 deletion.
    4 changes: 3 additions & 1 deletion arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -1,11 +1,13 @@
    // ==UserScript==
    // @name arte v2 stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1.5.2
    // @version 0.1.5.3
    // @description try to take over the world!
    // @author You
    // @match https://www.arte.tv/de/videos/*
    // @match https://www.arte.tv/fr/videos/*
    // @match https://www.arte.tv/de/arte-concert/*
    // @match https://www.arte.tv/fr/arte-concert/*
    // ==/UserScript==

    var loc = window.location.pathname.split('/');
  16. uahim revised this gist Jun 24, 2022. 1 changed file with 2 additions and 2 deletions.
    4 changes: 2 additions & 2 deletions arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    // ==UserScript==
    // @name arte v2 stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1.5.1
    // @version 0.1.5.2
    // @description try to take over the world!
    // @author You
    // @match https://www.arte.tv/de/videos/*
    @@ -21,7 +21,7 @@
    filmtitle = filmtitle.replace(" | ARTE", "").replace(/ /g, "_").replace(/[^a-z0-9 \.,_-]/gim, "");

    window.onload = function () {
    var para = document.createElement("a");
    var para = document.createElement("span");
    para.setAttribute('id', 'dwnl');
    para.setAttribute('style', 'font-weight: bold');
    para.setAttribute('style', 'color: white');
  17. uahim revised this gist Jun 24, 2022. 1 changed file with 2 additions and 1 deletion.
    3 changes: 2 additions & 1 deletion arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    // ==UserScript==
    // @name arte v2 stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1.5
    // @version 0.1.5.1
    // @description try to take over the world!
    // @author You
    // @match https://www.arte.tv/de/videos/*
    @@ -24,6 +24,7 @@
    var para = document.createElement("a");
    para.setAttribute('id', 'dwnl');
    para.setAttribute('style', 'font-weight: bold');
    para.setAttribute('style', 'color: white');
    para.setAttribute('class', ' css-d7iwcn');

    var node = document.createTextNode('Stream URL');
  18. uahim revised this gist Jun 23, 2022. 1 changed file with 1 addition and 2 deletions.
    3 changes: 1 addition & 2 deletions arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -18,8 +18,7 @@
    var download_url = api_base + id;

    var filmtitle = document.querySelector('meta[property="og:title"]').content;
    filmtitle = filmtitle.replace(" | ARTE", "");
    filmtitle = filmtitle.replace(/ /g, "_");
    filmtitle = filmtitle.replace(" | ARTE", "").replace(/ /g, "_").replace(/[^a-z0-9 \.,_-]/gim, "");

    window.onload = function () {
    var para = document.createElement("a");
  19. uahim revised this gist Jun 23, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -62,7 +62,7 @@
    document.getElementById('dwnl').addEventListener("click", function(){
    var test = prompt("stream URL (OK for ffmpeg command or cancel)", url);
    if (test !== null) {
    prompt("ffmpeg command", 'ffmpeg -referer "' + location.href + '" -user_agent "%ua%" -i "' + url + '" -c copy -bsf:a aac_adtstoasc "' + filmtitle + '.mp4"');
    prompt("ffmpeg command", 'ffmpeg -referer "' + location.href + '" -user_agent "Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:99.0) Gecko/20100101 Firefox/99.0" -i "' + url + '" -c copy -bsf:a aac_adtstoasc "' + filmtitle + '.mp4"');
    }
    });

  20. uahim revised this gist Jun 23, 2022. 1 changed file with 9 additions and 2 deletions.
    11 changes: 9 additions & 2 deletions arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    // ==UserScript==
    // @name arte v2 stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1.3
    // @version 0.1.5
    // @description try to take over the world!
    // @author You
    // @match https://www.arte.tv/de/videos/*
    @@ -17,6 +17,10 @@
    var api_base = " https://api.arte.tv/api/player/v2/config/" + lang + "/";
    var download_url = api_base + id;

    var filmtitle = document.querySelector('meta[property="og:title"]').content;
    filmtitle = filmtitle.replace(" | ARTE", "");
    filmtitle = filmtitle.replace(/ /g, "_");

    window.onload = function () {
    var para = document.createElement("a");
    para.setAttribute('id', 'dwnl');
    @@ -56,7 +60,10 @@
    });

    document.getElementById('dwnl').addEventListener("click", function(){
    prompt("Stream URL:", url)
    var test = prompt("stream URL (OK for ffmpeg command or cancel)", url);
    if (test !== null) {
    prompt("ffmpeg command", 'ffmpeg -referer "' + location.href + '" -user_agent "%ua%" -i "' + url + '" -c copy -bsf:a aac_adtstoasc "' + filmtitle + '.mp4"');
    }
    });

    };
  21. uahim revised this gist Jun 23, 2022. 1 changed file with 5 additions and 6 deletions.
    11 changes: 5 additions & 6 deletions arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -1,7 +1,7 @@
    // ==UserScript==
    // @name arte v2 stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1.2
    // @version 0.1.3
    // @description try to take over the world!
    // @author You
    // @match https://www.arte.tv/de/videos/*
    @@ -20,13 +20,12 @@
    window.onload = function () {
    var para = document.createElement("a");
    para.setAttribute('id', 'dwnl');
    para.setAttribute('class', ' css-1v6ntk7');
    para.setAttribute('style', 'color: #FFF');
    para.setAttribute('style', 'margin-top: 15px; margin-left: 5px');
    para.setAttribute('style', 'font-weight: bold');
    para.setAttribute('class', ' css-d7iwcn');

    var node = document.createTextNode(" Stream URL");
    var node = document.createTextNode('Stream URL');
    para.appendChild(node);
    document.getElementsByClassName('css-15dgfxu')[0].insertBefore(para, null);
    document.getElementsByClassName(' css-15dgfxu')[0].insertBefore(para, null);

    var getJSON = function(url, callback) {

  22. uahim revised this gist Jun 23, 2022. 1 changed file with 7 additions and 8 deletions.
    15 changes: 7 additions & 8 deletions arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -1,15 +1,13 @@
    // ==UserScript==
    // @name arte v2 stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1.1
    // @description this gets you the actual stream url (m3u8 file) to feed into VLC Media Player to watch or download via ffmpeg/youtube-dl
    // @author me
    // @version 0.1.2
    // @description try to take over the world!
    // @author You
    // @match https://www.arte.tv/de/videos/*
    // @match https://www.arte.tv/fr/videos/*
    // ==/UserScript==

    // this script adds a "Stream URL" link on top of the page, click it to get the stream url

    var loc = window.location.pathname.split('/');
    var lang = loc[1];
    var id = loc[3];
    @@ -22,12 +20,13 @@
    window.onload = function () {
    var para = document.createElement("a");
    para.setAttribute('id', 'dwnl');
    para.setAttribute('class', ' css-1kbmitx');
    para.setAttribute('class', ' css-1v6ntk7');
    para.setAttribute('style', 'color: #FFF');
    para.setAttribute('style', 'margin-top: 15px; margin-left: 5px');
    var node = document.createTextNode("Stream URL");

    var node = document.createTextNode(" Stream URL");
    para.appendChild(node);
    document.getElementsByClassName(' css-l3arc1')[0].insertBefore(para, null);
    document.getElementsByClassName('css-15dgfxu')[0].insertBefore(para, null);

    var getJSON = function(url, callback) {

  23. uahim revised this gist May 7, 2022. 1 changed file with 1 addition and 1 deletion.
    2 changes: 1 addition & 1 deletion arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -8,7 +8,7 @@
    // @match https://www.arte.tv/fr/videos/*
    // ==/UserScript==

    // this scrip adds a "Stream URL" link on top, click it to get the stream url
    // this script adds a "Stream URL" link on top of the page, click it to get the stream url

    var loc = window.location.pathname.split('/');
    var lang = loc[1];
  24. uahim revised this gist May 7, 2022. 1 changed file with 5 additions and 3 deletions.
    8 changes: 5 additions & 3 deletions arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -1,13 +1,15 @@
    // ==UserScript==
    // @name arte v2 stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1
    // @description try to take over the world!
    // @author You
    // @version 0.1.1
    // @description this gets you the actual stream url (m3u8 file) to feed into VLC Media Player to watch or download via ffmpeg/youtube-dl
    // @author me
    // @match https://www.arte.tv/de/videos/*
    // @match https://www.arte.tv/fr/videos/*
    // ==/UserScript==

    // this scrip adds a "Stream URL" link on top, click it to get the stream url

    var loc = window.location.pathname.split('/');
    var lang = loc[1];
    var id = loc[3];
  25. uahim revised this gist May 6, 2022. 1 changed file with 1 addition and 4 deletions.
    5 changes: 1 addition & 4 deletions arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -56,10 +56,7 @@
    });

    document.getElementById('dwnl').addEventListener("click", function(){
    alert(urls);
    prompt("Stream URL:", url)
    });

    };



  26. uahim created this gist May 6, 2022.
    65 changes: 65 additions & 0 deletions arte_v2.user.js
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,65 @@
    // ==UserScript==
    // @name arte v2 stream url
    // @namespace http://tampermonkey.net/
    // @version 0.1
    // @description try to take over the world!
    // @author You
    // @match https://www.arte.tv/de/videos/*
    // @match https://www.arte.tv/fr/videos/*
    // ==/UserScript==

    var loc = window.location.pathname.split('/');
    var lang = loc[1];
    var id = loc[3];
    var name = loc[4];
    var url = "";

    var api_base = " https://api.arte.tv/api/player/v2/config/" + lang + "/";
    var download_url = api_base + id;

    window.onload = function () {
    var para = document.createElement("a");
    para.setAttribute('id', 'dwnl');
    para.setAttribute('class', ' css-1kbmitx');
    para.setAttribute('style', 'color: #FFF');
    para.setAttribute('style', 'margin-top: 15px; margin-left: 5px');
    var node = document.createTextNode("Stream URL");
    para.appendChild(node);
    document.getElementsByClassName(' css-l3arc1')[0].insertBefore(para, null);

    var getJSON = function(url, callback) {

    var xhr = new XMLHttpRequest();
    xhr.open('GET', url, true);
    xhr.responseType = 'json';

    xhr.onload = function() {

    var status = xhr.status;

    if (status == 200) {
    callback(null, xhr.response);
    } else {
    callback(status);
    }
    };

    xhr.send();
    };

    getJSON(download_url, function(err, data) {
    if (err != null) {
    console.error(err);
    } else {
    url = data.data.attributes.streams[0].url;
    }
    });

    document.getElementById('dwnl').addEventListener("click", function(){
    alert(urls);
    });

    };