Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

JSInterpreter fail #16785

Closed
ruoying86 opened this issue Jun 21, 2018 · 1 comment
Closed

JSInterpreter fail #16785

ruoying86 opened this issue Jun 21, 2018 · 1 comment

Comments

@ruoying86
Copy link

@ruoying86 ruoying86 commented Jun 21, 2018

function getsign(){

var o = new IviBlowFish("f10232b7bc5c7ae8f796c1332b27a18c", "e9044861170176cc", "d20890c22e02ed83").cmacbf("tg_UHAJQh3g{"method":"da.content.get","params":[133305,{"app_version":5913,"session":"a92726aa1616000842_1543986721-78407951ADA8tRkQ7jp5Lxf5w8nb6g","site":"s1698","uid":"91523.213977600","_url":"https://www.ivi.tv","adblock":0,"user_ab_bucket":5305}]}");

return o;
});
def parse_sig_js(jscode):
jsi = JSInterpreter(jscode)
initial_function = jsi.extract_function("test")
s="test"
res=initial_function(s)
return res

errormsg:
raise ExtractorError('Unsupported JS expression %r' % expr)
ExtractorError: Unsupported JS expression u'new IviBlowFish("f10232b7bc5c7ae8f796c1332b27a18c", "e9044861170176cc", "d20890c22e02ed83").cmacbf("tg_UHAJQh3g{\"method\":\"da.content.get\",\"params\":[133305,{\"app_version\":5913,\"session\":\"a92726aa1616000842_1543986721'; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see https://yt-dl.org/update on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output

the version is the newest

@dstftw
Copy link
Collaborator

@dstftw dstftw commented Jun 21, 2018

JSInterpreter is not a full-fledged JS engine but only support particular language subset. Use phantomjs.

@dstftw dstftw closed this Jun 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.