mirror of
https://github.com/ytdl-org/youtube-dl
synced 2024-12-16 14:36:47 +00:00
[YouTube] Pass nsig value as return hook, fixes player 3bb1f723
This commit is contained in:
parent
a93fff3052
commit
9bc8fcf23c
@ -1,4 +1,5 @@
|
|||||||
#!/usr/bin/env python
|
#!/usr/bin/env python
|
||||||
|
# coding: utf-8
|
||||||
|
|
||||||
from __future__ import unicode_literals
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
@ -275,7 +276,8 @@ def signature(jscode, sig_input):
|
|||||||
|
|
||||||
def n_sig(jscode, sig_input):
|
def n_sig(jscode, sig_input):
|
||||||
funcname = YoutubeIE(FakeYDL())._extract_n_function_name(jscode)
|
funcname = YoutubeIE(FakeYDL())._extract_n_function_name(jscode)
|
||||||
return JSInterpreter(jscode).call_function(funcname, sig_input)
|
return JSInterpreter(jscode).call_function(
|
||||||
|
funcname, sig_input, _ytdl_do_not_return=sig_input)
|
||||||
|
|
||||||
|
|
||||||
make_sig_test = t_factory(
|
make_sig_test = t_factory(
|
||||||
|
@ -1740,7 +1740,7 @@ class YoutubeIE(YoutubeBaseInfoExtractor):
|
|||||||
|
|
||||||
def extract_nsig(s):
|
def extract_nsig(s):
|
||||||
try:
|
try:
|
||||||
ret = func([s])
|
ret = func([s], kwargs={'_ytdl_do_not_return': s})
|
||||||
except JSInterpreter.Exception:
|
except JSInterpreter.Exception:
|
||||||
raise
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
|
Loading…
Reference in New Issue
Block a user