From 9ae3bf216e5dd5a7597744160a1d676ac966e7a8 Mon Sep 17 00:00:00 2001 From: Omar Roth Date: Fri, 24 Aug 2018 07:17:16 -0500 Subject: [PATCH] Update signature extraction --- src/invidious/signatures.cr | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/invidious/signatures.cr b/src/invidious/signatures.cr index 589ad647..7959cb0b 100644 --- a/src/invidious/signatures.cr +++ b/src/invidious/signatures.cr @@ -3,7 +3,7 @@ def fetch_decrypt_function(client, id = "CvFH_6DNRCY") url = document.match(/src="(?\/yts\/jsbin\/player-.{9}\/en_US\/base.js)"/).not_nil!["url"] player = client.get(url).body - function_name = player.match(/\(b\|\|\(b="signature"\),d.set\(b,(?[a-zA-Z0-9]{2})\(c\)\)\)/).not_nil!["name"] + function_name = player.match(/"signature",(?[a-zA-Z0-9]{2})\(/).not_nil!["name"] function_body = player.match(/#{function_name}=function\(a\){(?[^}]+)}/).not_nil!["body"] function_body = function_body.split(";")[1..-2]