diff options
| author | Omar Roth <omarroth@hotmail.com> | 2018-09-07 15:52:46 -0500 |
|---|---|---|
| committer | Omar Roth <omarroth@hotmail.com> | 2018-09-07 15:52:46 -0500 |
| commit | 47e94fedc605a2b573eba66a243465aa049908ac (patch) | |
| tree | ff9b469c4a00a498ff861b57674268141dd97659 | |
| parent | aff2083529d2bb52cc97c958f30be2bcdd5b7eb9 (diff) | |
| download | invidious-47e94fedc605a2b573eba66a243465aa049908ac.tar.gz invidious-47e94fedc605a2b573eba66a243465aa049908ac.tar.bz2 invidious-47e94fedc605a2b573eba66a243465aa049908ac.zip | |
Fix signature extraction
| -rw-r--r-- | src/invidious/signatures.cr | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/signatures.cr b/src/invidious/signatures.cr index ecc9edc7..9e98c2a1 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="(?<url>\/yts\/jsbin\/player-.{9}\/en_US\/base.js)"/).not_nil!["url"] player = client.get(url).body - function_name = player.match(/"signature",(?<name>[a-zA-Z0-9]{2})\(/).not_nil!["name"] + function_name = player.match(/^(?<name>[^=]+)=function\(a\){a=a\.split\(""\)/m).not_nil!["name"] function_body = player.match(/^#{function_name}=function\(a\){(?<body>[^}]+)}/m).not_nil!["body"] function_body = function_body.split(";")[1..-2] |
