diff options
author | bashonly <88596187+bashonly@users.noreply.github.com> | 2024-12-06 15:35:18 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-06 15:35:18 +0000 |
commit | a95ee6d8803fca9157adecf63732ab58bf87fd88 (patch) | |
tree | eebccf7aea0a1189931cdf87bd15802b19dc31f6 /test/test_youtube_signature.py | |
parent | 4c85ccd1366c88cf93982f8350f58eed17355981 (diff) |
[ie/youtube] Fix `n` sig extraction for player `3bb1f723` (#11750)
Closes #11744
Authored by: bashonly
Diffstat (limited to 'test/test_youtube_signature.py')
-rw-r--r-- | test/test_youtube_signature.py | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/test/test_youtube_signature.py b/test/test_youtube_signature.py index 56db096ca..2a99436a6 100644 --- a/test/test_youtube_signature.py +++ b/test/test_youtube_signature.py @@ -188,6 +188,10 @@ _NSIG_TESTS = [ 'https://www.youtube.com/s/player/b12cc44b/player_ias.vflset/en_US/base.js', 'keLa5R2U00sR9SQK', 'N1OGyujjEwMnLw', ), + ( + 'https://www.youtube.com/s/player/3bb1f723/player_ias.vflset/en_US/base.js', + 'gK15nzVyaXE9RsMP3z', 'ZFFWFLPWx9DEgQ', + ), ] @@ -259,8 +263,11 @@ def signature(jscode, sig_input): def n_sig(jscode, sig_input): - funcname = YoutubeIE(FakeYDL())._extract_n_function_name(jscode) - return JSInterpreter(jscode).call_function(funcname, sig_input) + ie = YoutubeIE(FakeYDL()) + funcname = ie._extract_n_function_name(jscode) + jsi = JSInterpreter(jscode) + func = jsi.extract_function_from_code(*ie._fixup_n_function_code(*jsi.extract_function_code(funcname))) + return func([sig_input]) make_sig_test = t_factory( |