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.
get stream url - 0.1.8.2 updated April 2025, dirty but working fix; now with concert support
// ==UserScript==
// @name arte v2 stream url
// @namespace http://tampermonkey.net/
// @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/*
// ==/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;
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, "");
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');
var node = document.createElement("span");
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) {
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(){
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"');
}
});
};
@osvivant
Copy link

Hi, uahim

It doesn't work since yesterday, would you kindly have a look? many thanks.

@uahim
Copy link
Author

uahim commented Jun 25, 2023

@osvivant try now - 0.1.5.4 should be working

@osvivant
Copy link

Thanks uahim! works flawless now:)

@uahim
Copy link
Author

uahim commented Jun 26, 2023

0.1.5.6 fixes arte concert, sorry

@osvivant
Copy link

:) thanks!!!!!

@uahim
Copy link
Author

uahim commented Nov 20, 2023

0.1.6: updated November 2023 to account for markup changes on arte.tv

@jeanpierrebertola
Copy link

thank you but to record with VLC is problematic.
something block
possible to read but not to record
Thank

@uahim
Copy link
Author

uahim commented Nov 25, 2023

@jeanpierrebertola for downloading, it's recommended to use yt-dlp or at least ffmpeg, here's a guide for beginners:
https://www.rapidseedbox.com/blog/yt-dlp-complete-guide

@jeanpierrebertola
Copy link

thank you ++++++

@osvivant
Copy link

osvivant commented May 3, 2024

Hi, it stopped to work these days. Would you please have a look? thank you very much.

ex:
https://www.arte.tv/fr/videos/116710-062-A/le-dessous-des-images/

@uahim
Copy link
Author

uahim commented May 3, 2024

@osvivant try now

@osvivant
Copy link

osvivant commented May 3, 2024

thanks, it works!

@jeanpierrebertola
Copy link

it,s stop to work !

@uahim
Copy link
Author

uahim commented Apr 15, 2025

it,s stop to work !

hi - quick and VERY DIRTY fix, version 0.1.8.1 now works - you just have to wait 2.5 seconds after page loading, then the button will appear

@jeanpierrebertola
Copy link

jeanpierrebertola commented Apr 15, 2025 via email

@jeanpierrebertola
Copy link

jeanpierrebertola commented Apr 15, 2025 via email

@osvivant
Copy link

Thanks, works perfectly!!!

@uahim
Copy link
Author

uahim commented Apr 23, 2025

I have uploaded the script to GreasyFork, so please re-install it from
https://greasyfork.org/en/scripts/533451-arte-stream-url

this will ensure you can just auto-update future versions with one click :-)

@jeanpierrebertola
Copy link

Hello it Works no more !
Regards,
JP

@uahim
Copy link
Author

uahim commented Jul 19, 2025

@jeanpierrebertola thanks for letting me know - fixed, you can update via greasyfork

@jeanpierrebertola
Copy link

jeanpierrebertola commented Jul 19, 2025 via email

@uahim
Copy link
Author

uahim commented Sep 28, 2025

@osvivant @jeanpierrebertola
hey everyone, especially users from France:
I have posted version 1.0 on greasyfork (with a new feature), so please test it and let me know if it works for you!

@jeanpierrebertola
Copy link

hello There is the URL Field but it contain no URL adress when you clic on
Thank you

@uahim
Copy link
Author

uahim commented Sep 28, 2025

@jeanpierrebertola ok thanks for checking

for now, it's best to downgrade to the previous version:
https://greasyfork.org/en/scripts/533451-arte-stream-url?version=1647882

@uahim
Copy link
Author

uahim commented Sep 28, 2025

@jeanpierrebertola please test version 1.1, I think it should be working for you now :)

@jeanpierrebertola
Copy link

jeanpierrebertola commented Oct 4, 2025 via email

@jeanpierrebertola
Copy link

you are right it's necessary to downgrade thank you

@uahim
Copy link
Author

uahim commented Oct 5, 2025

@jeanpierrebertola have you tried multiple videos or was it just one?

it can always be a temporary problem, in this case, try reloading the page.

I checked the latest version in Firefox and Chrome via Violentmoney and don't see any changes so far.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment