-
Notifications
You must be signed in to change notification settings - Fork 10.1k
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
[JSInterp, YouTube] Support YT player b22ef6e7
etc
#32845
Conversation
Adds some extensions missing in 4652109 (from yt-dlp/yt-dlp#10362) Authored by: bashonly Co-authored by: dirkf
Thx: various yt-dlp authors
Passes tests from yt-dlp
👍 works for me, thanks! |
if obj == compat_str: | ||
# Fixup prototype call | ||
if isinstance(obj, type): | ||
new_member, rest = member.partition('.')[0::2] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not
new_member, rest = member.partition('.')[0::2] | |
new_member, _, rest = member.partition('.') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Call me a slicer rather than a destructurer. Also that's what I had in my somewhat similar code before I applied yt-dlp/yt-dlp#10392.
* support `prototype` for call() and apply() (yt-dlp/yt-dlp#10392, thx Grub4k) * map JS `Array` to `list`
* improve extraction of function name (like yt-dlp/yt-dlp#10390) * always use JSInterp to extract function code (yt-dlp/yt-dlp#10396, thx seproDev, pukkandan)
Boilerplate: own/yt-dlp code, fix/improvement
Please follow the guide below
x
into all the boxes [ ] relevant to your pull request (like that [x])Before submitting a pull request make sure you have:
In order to be accepted and merged into youtube-dl each piece of code must be in public domain or released under Unlicense. Check one of the following options:
What is the purpose of your pull request?
Description of your pull request and other information
This PR supports YT player
b22ef6e7
(probably just in time for it to be withdrawn).At the same time, the opportunity was taken to improve the alignment of the code and tests with yt-dlp.
Fixes #32842.
Supersedes, closes #32843.
Also included is a previously intended update to PR #32830.
Thx @Grub4K, @bashonly, @seproDev, @pukkandan and possibly others for yt-dlp code included here.