aboutsummaryrefslogtreecommitdiff
path: root/youtube_dl/jsinterp.py
AgeCommit message (Collapse)Author
2023-07-18[test] Fixes for old Pythonsdirkf
2023-07-05[Misc] Fixes for 2.6 compatibilitydirkf
2023-06-18[YouTube] Improve fix for ae8ba2cdirkf
Thx: https://github.com/yt-dlp/yt-dlp/commit/01aba25
2023-06-17[jsinterp] Don't find unrelated objectsdirkf
2023-06-17[jsinterp] Fix test for failed match in extract_object()dirkf
2023-06-11[jsinterp] Fix div bug breaking player 8c7583ffdirkf
Thx bashonly: https://github.com/ytdl-org/youtube-dl/issues/32292#issuecomment-1585639223 Fixes #32292
2023-05-23[jsinterp] Small updates for a85a875dirkf
* update signature tests * clarify NaN handling
2023-05-11[jsinterp] Add short-cut evaluation for common expressiondirkf
* special handling for (d%e.length+e.length)%e.length speeds up ~6%
2023-05-11[jsinterp] Handle NaN in bitwise operatorsdirkf
* also add _NaN * also pull function naming from yt-dlp
2023-04-21[jsinterp] Minimally handle arithmetic operator precedencedirkf
Resolves #32066
2023-03-07[jsinterp] Fix regexp parsing and .replace[All] methoddirkf
* For performance, make regexp object instantiation lazy * Other small performance improvements
2023-03-03[jsinterp] Handle `Date` at epoch 0pukkandan
See yt-dlp/yt_dlp#6400
2023-02-19[jsinterp] Fix dict comprehension for Py2.6dirkf
Resolves #31600
2023-02-12[jsinterp] Nitsdirkf
2023-02-02[jsinterp] Improve parsingdirkf
* support subset `... else if ...` * support `while` * add `RegExp` class * generalise `new` support * limited more debug strings * matching test changes
2023-02-02Support `if` statementspukkandan
Fix for yt-dlp/yt_dlp#6131 Closes #31509
2022-10-11[JSInterp] Improve separation logicdirkf
Based on https://github.com/yt-dlp/yt-dlp/commit/0468a3b3253957bfbeb98b4a7c71542ff80e9e06
2022-09-03[jsinterp] Workaround operator associativity issuepukkandan
* temporary fix for player 5a3b6271 [1] 1. https://github.com/yt-dlp/yt-dlp/issues/4635#issuecomment-1235384480
2022-09-01[jsinterp] Handle new YT players 113ca41c, c57c113cdirkf
* add NaN * allow any white-space character for `after_op` * align with yt-dlp f26af78a8ac11d9d617ed31ea5282cfaa5bcbcfa (charcodeAt and bitwise overflow) * allow escaping in regex, fixing player c57c113c
2022-08-26[jsinterp] Improve try/catch/finally supportdirkf
2022-08-25[jsinterp] Fix bug in operator precedencedirkf
* from https://github.com/yt-dlp/yt-dlp/commit/164b03c4864b0d44cfee5e7702f7c2317164a6cf * added tests
2022-08-19[jsinterp] Clean up and pull yt-dlp styledirkf
* add compat_re_Pattern * improve compat_collections_chain_map * use class JS_Undefined * remove unused code
2022-08-19[jsinterp] Handle regexp literals and throw/catch execution (#31182)dirkf
* based on https://github.com/yt-dlp/yt-dlp/commit/f6ca640b122239d5ab215f8c2564efb7ac3e8c65, thanks pukkandan * adds parse support for regexp flags
2022-08-17[jsinterp] Improve JS language support (#31175)dirkf
* operator ?? * operator ?. * operator ** * accurate operator functions * `undefined` handling * object literals {a: 1, "b": expr} * more tests for weird JS comparisons: see https://github.com/ytdl-org/youtube-dl/issues/31173#issuecomment-1217854397.
2022-08-14[jsinterp] Overhaul JSInterp to handle new YT players 4c3f79c5, 324f67b9 ↵dirkf
(#31170) * back-port from yt-dlp 8f53dc44a0cc1c2d98c35740b9293462c080f5d0, thanks pukkandan * also support void, improve <</>> precedence, improve expressions in comma-list * add more tests
2022-01-30Refactor JSInterpreter._separatedirkf
yt-dlp/yt-dlp/@06dfe0a, improve _MATCHING_PARENS
2022-01-30Back-port test_youtube_signature.py from yt-dlp and fix JSInterp accordinglydirkf
2022-01-30Fix splice to handle floatdirkf
Needed for new youtube js player f1ca6900 Add https://github.com/yt-dlp/yt-dlp/commit/57dbe8077f8d00e0fffac53669f40cd7d584474f#diff-729b57caa8d006426f6a8960c061f519a8b6658682284015e069745af52ffb07
2022-01-30Handle default in switch betterdf
Add https://github.com/yt-dlp/yt-dlp/commit/a1fc7ca0743c8df06416e68ee74b64e07dfe7135 Thanks coletdjnz
2022-01-30Back-port JS interpreter upgrade from yt-dlp PR #1437df
2017-05-18[jsinterp] Fix typo and cleanup regexes (closes #13134)Sergey M․
2017-05-18[jsinterp] Add support for quoted names and indexers (closes #13123, closes ↵Sergey M․
#13130)
2017-01-10[youtube] Fix extraction (closes #11663, #11664)Sergey M․
2016-11-11[jsinterp] Fix function calls without arguments.Kacper Michajłow
2016-06-23[jsinterp] Relax JS function regex (Closes #9863)Sergey M․
2016-06-20Revert "[jsinterp] Avoid double key lookup for setting new key"Philipp Hagemeister
This reverts commit 7c05097633138459e9bdf7e10738e021b04689a7.
2016-06-19[jsinterp] Avoid double key lookup for setting new keyLucas Moura
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.
2015-12-18[jsinterp] Extend function regex (Closes #7900, closes #7901)Sergey M․
2015-11-24[jsinterp] Adapt to updated YouTube code generation (Fixes #7623, fixes ↵Philipp Hagemeister
#7624, fixes #7625, fixes #7626)
2015-11-10[jsinterp] Support alternative function definition formYen Chi Hsuan
2015-02-18[jsinterp] Disable comment supportPhilipp Hagemeister
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 #4976, fixes #4979, fixes #4980, fixes #4981, fixes #4982. Closes #4977.
2015-02-02[jsinterp] Correct div commandPhilipp Hagemeister
2015-02-01[jsinterp] Beef up and add testsPhilipp Hagemeister
In preparation for #4822, extend jsinterp by a lot. (We may even have to/want to write a proper interpreter with actual parsing)
2014-11-21Update jsinterp.pytinybug
http://s.ytimg.com/yts/jsbin/html5player-zh_HK-vfl1NK6PR/html5player.js fix raise ExtractorError
2014-07-25[jsinterp] Fix slicePhilipp Hagemeister
2014-07-25[jsinterp] Allow uppercase object namesPhilipp Hagemeister
2014-07-24[jsinterp] Do not expect dot in simple function callPhilipp Hagemeister
2014-07-24[jsinterp] 'reverse' modifies the array in place (fixes #3334)Jaime Marquínez Ferrándiz
2014-07-24[jsinterp] Implement splice and general improvementPhilipp Hagemeister
I still get 403s on YouTube though.
2014-07-23[jsinterp] Allow digits in function namesPhilipp Hagemeister