forked from tastytea/userscripts
ard_download_button: Added support for format516040.mp4-URLs.
This commit is contained in:
parent
1b35d0cbac
commit
2e1e6d8416
|
@ -2,7 +2,7 @@
|
|||
// @name ARD download button
|
||||
// @description Adds a download-button for every video on ardmediathek.de.
|
||||
// @description:de Fügt einen download-button für jedes video auf ardmediathek.de hinzu.
|
||||
// @version 2019.06.22.4
|
||||
// @version 2019.06.22.5
|
||||
// @author tastytea
|
||||
// @copyright 2019, tastytea (https://tastytea.de/)
|
||||
// @license GPL-3.0-only
|
||||
|
@ -45,8 +45,10 @@ function get_url() // Extract URL from HTML.
|
|||
const html = document.getElementsByTagName('html')[0].innerHTML;
|
||||
const re_mp4 = new RegExp( // ARD
|
||||
'"(https://pdvideosdaserste-a\.akamaihd\.net/[^"]+/320-[^"]+\.mp4)"');
|
||||
const re_516 = new RegExp( // ARD, 960x544 (WTF?)
|
||||
'"(https://pdvideosdaserste-a\.akamaihd.net/[^"]+format516040.mp4)"');
|
||||
const re_m3u = new RegExp( // MDR
|
||||
'"(https://[^"]+\.akamaihd\.net/[^"]+master\.m3u8)"');
|
||||
'"(https://[^,"]+\.akamaihd\.net/[^,"]+master\.m3u8)"');
|
||||
|
||||
let result = re_mp4.exec(html);
|
||||
if (result !== null)
|
||||
|
@ -54,6 +56,12 @@ function get_url() // Extract URL from HTML.
|
|||
return result[1].replace("/320-", "/1280-");
|
||||
}
|
||||
|
||||
result = re_516.exec(html);
|
||||
if (result !== null)
|
||||
{
|
||||
return result[1];
|
||||
}
|
||||
|
||||
result = re_m3u.exec(html);
|
||||
if (result !== null)
|
||||
{
|
||||
|
|
|
@ -1,19 +0,0 @@
|
|||
// ==UserScript==
|
||||
// @name NDR HD button
|
||||
// @description DEPRECATED
|
||||
// @version 2019.06.17.1
|
||||
// @author tastytea
|
||||
// @copyright 2019, tastytea (https://tastytea.de/)
|
||||
// @license GPL-3.0-only
|
||||
// @namespace tastytea.de
|
||||
// @homepageURL https://schlomp.space/tastytea/userscripts
|
||||
// @supportURL https://schlomp.space/tastytea/userscripts/issues
|
||||
// @downloadURL https://schlomp.space/tastytea/userscripts/raw/branch/main/video/ndr_hd_button.user.js
|
||||
// @grant none
|
||||
// @match https://*.ndr.de/*
|
||||
// @run-at document-end
|
||||
// @inject-into content
|
||||
// ==/UserScript==
|
||||
|
||||
alert("The userscript “NDR HD button” is deprecated. Please use “NDR download button” instead.\n"
|
||||
+ "https://openuserjs.org/scripts/tastytea/NDR_download_button");
|
Loading…
Reference in New Issue