summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOmar Roth <omarroth@protonmail.com>2020-04-09 10:53:00 -0500
committerOmar Roth <omarroth@protonmail.com>2020-04-09 10:55:50 -0500
commit02d4186b110bb5cf8cc07672a4ff45f7189eb3e6 (patch)
tree6b3874b459ae323985de54828600acd600f4919d
parent3f97bebd6956ee1b111a2c23057a4facd6cbef0a (diff)
downloadinvidious-02d4186b110bb5cf8cc07672a4ff45f7189eb3e6.tar.gz
invidious-02d4186b110bb5cf8cc07672a4ff45f7189eb3e6.tar.bz2
invidious-02d4186b110bb5cf8cc07672a4ff45f7189eb3e6.zip
Fix player matching
-rw-r--r--src/invidious/helpers/signatures.cr2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/invidious/helpers/signatures.cr b/src/invidious/helpers/signatures.cr
index ab864f03..f82cc8dd 100644
--- a/src/invidious/helpers/signatures.cr
+++ b/src/invidious/helpers/signatures.cr
@@ -2,7 +2,7 @@ alias SigProc = Proc(Array(String), Int32, Array(String))
def fetch_decrypt_function(id = "CvFH_6DNRCY")
document = YT_POOL.client &.get("/watch?v=#{id}&gl=US&hl=en&disable_polymer=1").body
- url = document.match(/src="(?<url>\/yts\/jsbin\/player_ias-[^\/]+\/en_US\/base.js)"/).not_nil!["url"]
+ url = document.match(/src="(?<url>.*player_ias[^\/]+\/en_US\/base.js)"/).not_nil!["url"]
player = YT_POOL.client &.get(url).body
function_name = player.match(/^(?<name>[^=]+)=function\(\w\){\w=\w\.split\(""\);[^\. ]+\.[^( ]+/m).not_nil!["name"]