about summary refs log tree commit diff
path: root/youtube_dl/jsinterp.py
Commit message (Collapse)AuthorAgeFilesLines
* [test] Fixes for old Pythonsdirkf2023-07-181-7/+7
|
* [Misc] Fixes for 2.6 compatibilitydirkf2023-07-051-1/+12
|
* [YouTube] Improve fix for ae8ba2cdirkf2023-06-181-9/+12
| | | | Thx: https://github.com/yt-dlp/yt-dlp/commit/01aba25
* [jsinterp] Don't find unrelated objectsdirkf2023-06-171-7/+7
|
* [jsinterp] Fix test for failed match in extract_object()dirkf2023-06-171-1/+1
|
* [jsinterp] Fix div bug breaking player 8c7583ffdirkf2023-06-111-1/+1
| | | | | Thx bashonly: https://github.com/ytdl-org/youtube-dl/issues/32292#issuecomment-1585639223 Fixes #32292
* [jsinterp] Small updates for a85a875dirkf2023-05-231-7/+5
| | | | | * update signature tests * clarify NaN handling
* [jsinterp] Add short-cut evaluation for common expressiondirkf2023-05-111-2/+20
| | | | * special handling for (d%e.length+e.length)%e.length speeds up ~6%
* [jsinterp] Handle NaN in bitwise operatorsdirkf2023-05-111-9/+32
| | | | | * also add _NaN * also pull function naming from yt-dlp
* [jsinterp] Minimally handle arithmetic operator precedencedirkf2023-04-211-3/+37
| | | | Resolves #32066
* [jsinterp] Fix regexp parsing and .replace[All] methoddirkf2023-03-071-27/+57
| | | | | * For performance, make regexp object instantiation lazy * Other small performance improvements
* [jsinterp] Handle `Date` at epoch 0pukkandan2023-03-031-1/+1
| | | | See yt-dlp/yt_dlp#6400
* [jsinterp] Fix dict comprehension for Py2.6dirkf2023-02-191-1/+1
| | | | Resolves #31600
* [jsinterp] Nitsdirkf2023-02-121-2/+2
|
* [jsinterp] Improve parsingdirkf2023-02-021-52/+104
| | | | | | | | | * support subset `... else if ...` * support `while` * add `RegExp` class * generalise `new` support * limited more debug strings * matching test changes
* Support `if` statementspukkandan2023-02-021-3/+18
| | | | | Fix for yt-dlp/yt_dlp#6131 Closes #31509
* [JSInterp] Improve separation logicdirkf2022-10-111-3/+3
| | | Based on https://github.com/yt-dlp/yt-dlp/commit/0468a3b3253957bfbeb98b4a7c71542ff80e9e06
* [jsinterp] Workaround operator associativity issuepukkandan2022-09-031-1/+1
| | | | | | * temporary fix for player 5a3b6271 [1] 1. https://github.com/yt-dlp/yt-dlp/issues/4635#issuecomment-1235384480
* [jsinterp] Handle new YT players 113ca41c, c57c113cdirkf2022-09-011-18/+28
| | | | | | | * 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
* [jsinterp] Improve try/catch/finally supportdirkf2022-08-261-41/+51
|
* [jsinterp] Fix bug in operator precedencedirkf2022-08-251-1/+6
| | | | | * from https://github.com/yt-dlp/yt-dlp/commit/164b03c4864b0d44cfee5e7702f7c2317164a6cf * added tests
* [jsinterp] Clean up and pull yt-dlp styledirkf2022-08-191-78/+45
| | | | | | | * add compat_re_Pattern * improve compat_collections_chain_map * use class JS_Undefined * remove unused code
* [jsinterp] Handle regexp literals and throw/catch execution (#31182)dirkf2022-08-191-22/+114
| | | | * based on https://github.com/yt-dlp/yt-dlp/commit/f6ca640b122239d5ab215f8c2564efb7ac3e8c65, thanks pukkandan * adds parse support for regexp flags
* [jsinterp] Improve JS language support (#31175)dirkf2022-08-171-40/+149
| | | | | | | | | * 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.
* [jsinterp] Overhaul JSInterp to handle new YT players 4c3f79c5, 324f67b9 ↵dirkf2022-08-141-235/+354
| | | | | | | (#31170) * back-port from yt-dlp 8f53dc44a0cc1c2d98c35740b9293462c080f5d0, thanks pukkandan * also support void, improve <</>> precedence, improve expressions in comma-list * add more tests
* Refactor JSInterpreter._separatedirkf2022-01-301-18/+18
| | | | yt-dlp/yt-dlp/@06dfe0a, improve _MATCHING_PARENS
* Back-port test_youtube_signature.py from yt-dlp and fix JSInterp accordinglydirkf2022-01-301-4/+5
|
* Fix splice to handle floatdirkf2022-01-301-1/+1
| | | | | Needed for new youtube js player f1ca6900 Add https://github.com/yt-dlp/yt-dlp/commit/57dbe8077f8d00e0fffac53669f40cd7d584474f#diff-729b57caa8d006426f6a8960c061f519a8b6658682284015e069745af52ffb07
* Handle default in switch betterdf2022-01-301-9/+14
| | | | | Add https://github.com/yt-dlp/yt-dlp/commit/a1fc7ca0743c8df06416e68ee74b64e07dfe7135 Thanks coletdjnz
* Back-port JS interpreter upgrade from yt-dlp PR #1437df2022-01-301-107/+397
|
* [jsinterp] Fix typo and cleanup regexes (closes #13134)Sergey M․2017-05-181-5/+8
|
* [jsinterp] Add support for quoted names and indexers (closes #13123, closes ↵Sergey M․2017-05-181-16/+17
| | | | #13130)
* [youtube] Fix extraction (closes #11663, #11664)Sergey M․2017-01-101-1/+1
|
* [jsinterp] Fix function calls without arguments.Kacper Michajłow2016-11-111-2/+2
|
* [jsinterp] Relax JS function regex (Closes #9863)Sergey M․2016-06-231-1/+1
|
* Revert "[jsinterp] Avoid double key lookup for setting new key"Philipp Hagemeister2016-06-201-3/+5
| | | | This reverts commit 7c05097633138459e9bdf7e10738e021b04689a7.
* [jsinterp] Avoid double key lookup for setting new keyLucas Moura2016-06-191-5/+3
| | | | | | | | 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.
* [jsinterp] Extend function regex (Closes #7900, closes #7901)Sergey M․2015-12-181-1/+1
|
* [jsinterp] Adapt to updated YouTube code generation (Fixes #7623, fixes ↵Philipp Hagemeister2015-11-241-1/+1
| | | | #7624, fixes #7625, fixes #7626)
* [jsinterp] Support alternative function definition formYen Chi Hsuan2015-11-101-2/+2
|
* [jsinterp] Disable comment supportPhilipp Hagemeister2015-02-181-4/+1
| | | | | | | | 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.
* [jsinterp] Correct div commandPhilipp Hagemeister2015-02-021-1/+1
|
* [jsinterp] Beef up and add testsPhilipp Hagemeister2015-02-011-46/+126
| | | | In preparation for #4822, extend jsinterp by a lot. (We may even have to/want to write a proper interpreter with actual parsing)
* Update jsinterp.pytinybug2014-11-211-1/+1
| | | | http://s.ytimg.com/yts/jsbin/html5player-zh_HK-vfl1NK6PR/html5player.js fix raise ExtractorError
* [jsinterp] Fix slicePhilipp Hagemeister2014-07-251-1/+1
|
* [jsinterp] Allow uppercase object namesPhilipp Hagemeister2014-07-251-1/+1
|
* [jsinterp] Do not expect dot in simple function callPhilipp Hagemeister2014-07-241-1/+1
|
* [jsinterp] 'reverse' modifies the array in place (fixes #3334)Jaime Marquínez Ferrándiz2014-07-241-1/+2
|
* [jsinterp] Implement splice and general improvementPhilipp Hagemeister2014-07-241-28/+58
| | | | I still get 403s on YouTube though.
* [jsinterp] Allow digits in function namesPhilipp Hagemeister2014-07-231-2/+2
|