Commit 9c9075f3 authored by sebaro's avatar sebaro

Fix YouTube

parent 2dca28b5
......@@ -3,6 +3,9 @@
/* SaveTube Changelog */
#2019.03.02
- fixes YouTube
#2019.01.18
- fixes YouTube, IMDb
- removes support for Break because of regional restrictions
......
......@@ -2,7 +2,7 @@
"manifest_version": 2,
"name": "SaveTube",
"version": "2019.1.18",
"version": "2019.3.2",
"description": "Download videos from video sharing web sites.",
......
// ==UserScript==
// @name SaveTube
// @version 2019.01.18
// @version 2019.03.02
// @description Download videos from video sharing web sites.
// @author sebaro
// @namespace http://sebaro.pro/savetube
......@@ -588,7 +588,7 @@ function SaveTube() {
var ytSignFuncName, ytSignFuncBody, ytSwapFuncName, ytSwapFuncBody, ytFuncMatch;
ytScriptSrc = ytScriptSrc.replace(/(\r\n|\n|\r)/gm, '');
ytSignFuncName = ytScriptSrc.match(/"signature"\s*,\s*([^\)]*?)\(/);
if (!ytSignFuncName) ytSignFuncName = ytScriptSrc.match(/d.set\(b,(?:encodeURIComponent\()?.*?([a-zA-Z0-9]+)\(/);
if (!ytSignFuncName) ytSignFuncName = ytScriptSrc.match(/d.set\(b,(?:encodeURIComponent\()?.*?([a-zA-Z0-9$]+)\(/);
ytSignFuncName = (ytSignFuncName) ? ytSignFuncName[1] : null;
if (ytSignFuncName) {
ytFuncMatch = ytSignFuncName.replace(/\$/, '\\$') + '\\s*=\\s*function\\s*' + '\\s*\\(\\w+\\)\\s*\\{(.*?)\\}';
......
// ==UserScript==
// @name SaveTube
// @version 2019.01.18
// @version 2019.03.02
// @description Download videos from video sharing web sites.
// @author sebaro
// @namespace http://sebaro.pro/savetube
......@@ -588,7 +588,7 @@ function SaveTube() {
var ytSignFuncName, ytSignFuncBody, ytSwapFuncName, ytSwapFuncBody, ytFuncMatch;
ytScriptSrc = ytScriptSrc.replace(/(\r\n|\n|\r)/gm, '');
ytSignFuncName = ytScriptSrc.match(/"signature"\s*,\s*([^\)]*?)\(/);
if (!ytSignFuncName) ytSignFuncName = ytScriptSrc.match(/d.set\(b,(?:encodeURIComponent\()?.*?([a-zA-Z0-9]+)\(/);
if (!ytSignFuncName) ytSignFuncName = ytScriptSrc.match(/d.set\(b,(?:encodeURIComponent\()?.*?([a-zA-Z0-9$]+)\(/);
ytSignFuncName = (ytSignFuncName) ? ytSignFuncName[1] : null;
if (ytSignFuncName) {
ytFuncMatch = ytSignFuncName.replace(/\$/, '\\$') + '\\s*=\\s*function\\s*' + '\\s*\\(\\w+\\)\\s*\\{(.*?)\\}';
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment