Kind of curious what js code gets put into this "interpreter", anyone want to add a print and see?
DOWNLOADING YOUTUBE VIDEOS IS NON FREE
Technically it can execute some very simple chunks of code.
I dare the other guy to run any malicious program with it, FizzBuzz will count.
% PYTHONPATH=. python3Python 3.4.2 (default, Oct 8 2014, 10:45:20)[GCC 4.9.1] on linuxType "help", "copyright", "credits" or "license" for more information.>>> from youtube_dl.jsinterp import *>>> js = JSInterpreter("function foo(x) { return x + x }")>>> f = js.extract_function("foo")>>> f([10])20
In order to let LibreJS know whether it should execute a script or not, it must first parse the code to determine whether it's trivial enough not to consider it an actual script, or to know whether it is libre or not.
I call it Schrodinger's license.
/thread
JSInterpreter is used only by youtube extractor and only for videos with "signatures", no idea what those are. It parses a shit load of unreadable compressed javascript. The extracted code seems to concatenate elements of some array into some kind of string.
Here is example of such videobb
youtube.com
but it does execute. prove me wrong faggot
See retard
>>>/reddit/
that just proves me right
kys
...