Commit Graph

23 Commits (1640eb096166c81918125a0a7462eb2edb063167)

Author SHA1 Message Date
Sergey M․ d1aeacd9bf
[youtube] Fix extraction (closes , )
Kacper Michajłow 189935f159 [jsinterp] Fix function calls without arguments.
Sergey M․ b46eabecd3
[jsinterp] Relax JS function regex (Closes )
Philipp Hagemeister 1f749b6658 Revert "[jsinterp] Avoid double key lookup for setting new key"
This reverts commit 7c05097633.
Lucas Moura 7c05097633
[jsinterp] Avoid double key lookup for setting new key
In order to add a new key to both __objects and __functions dicts on jsinterp.py, it is
necessary to first verify if a key was present and if not, create the key and
assign it to a value.

However, this can be done with a single step using dict setdefault method.
Sergey M․ b95779be21 [jsinterp] Extend function regex (Closes , closes )
Philipp Hagemeister 4c7d816dd7 [jsinterp] Adapt to updated YouTube code generation (Fixes , fixes , fixes , fixes )
Yen Chi Hsuan ff29bf81f8 [jsinterp] Support alternative function definition form
Philipp Hagemeister 3eff81fbf7 [jsinterp] Disable comment support
We need a proper lexer to be able to understand YouTube's code, which contains /* inside of strings.
For now it's sufficient to just disable comment support altogether.

Fixes , fixes , fixes , fixes , fixes .
Closes .
Philipp Hagemeister 8cfb6efe6f [jsinterp] Correct div command
Philipp Hagemeister 9e3f19919a [jsinterp] Beef up and add tests
In preparation for , extend jsinterp by a lot. (We may even have to/want to write a proper interpreter with actual parsing)
tinybug 85b9275517 Update jsinterp.py
http://s.ytimg.com/yts/jsbin/html5player-zh_HK-vfl1NK6PR/html5player.js 
fix raise ExtractorError
Philipp Hagemeister 4cb71e9b6a [jsinterp] Fix slice
Philipp Hagemeister 16f8e9df8a [jsinterp] Allow uppercase object names
Philipp Hagemeister 892e3192fb [jsinterp] Do not expect dot in simple function call
Jaime Marquínez Ferrándiz ebe832dc37 [jsinterp] 'reverse' modifies the array in place (fixes )
Philipp Hagemeister 825abb8175 [jsinterp] Implement splice and general improvement
I still get 403s on YouTube though.
Philipp Hagemeister 9f43890bcd [jsinterp] Allow digits in function names
Jaime Marquínez Ferrándiz ad25aee245 [youtube & jsinterp] Fix signature extraction (fixes )
Some functions are defined now inside an object, the jsinterp will search its definition if the variable is not defined in the local namespace.
Philipp Hagemeister fc040bfd05 [jsinterp] Prevent mis-recognitions of local functions
Philipp Hagemeister 61989fb5e9 [jsinterp] Remove superfluous u
Philipp Hagemeister 77ffa95701 [jsinterp] Better error messages
Philipp Hagemeister 2b25cb5d76 [youtube] Move JavaScript interpreter into its own module