Skip to content
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] Support YT player 590f65a6 #32820

Merged
merged 5 commits into from
Jun 20, 2024
Merged

[jsinterp] Support YT player 590f65a6 #32820

merged 5 commits into from
Jun 20, 2024

Conversation

dirkf
Copy link
Contributor

@dirkf dirkf commented Jun 20, 2024

Boilerplate: own/yt-dlp code, fix/improvement

Please follow the guide below

  • You will be asked some questions, please read them carefully and answer honestly
  • Put an x into all the boxes [ ] relevant to your pull request (like that [x])
  • Use Preview tab to see how your pull request will actually look like

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:

  • I am the original author of this code and I am willing to release it under Unlicense, except for code from yt-dlp for which this or the below has been asserted.
  • I am not the original author of this code but it is in public domain or released under Unlicense (provide reliable evidence)

What is the purpose of your pull request?

  • Bug fix
  • Improvement
  • New extractor
  • New feature

Description of the pull request

YT player 590f65a6 revealed a bug in arithmetic evaluation in the JSInterpreter module. The PR corrects this and also makes a previously failing proposed test work; resolves #32815.

The bug also revealed some incomplete or inadequate back-porting:

  • following yt-dlp, orig_msg is now set in ExtractorError
  • an invalid integer format in an error message was changed to !r

To assist in resolving the problem, yt-dlp's interpreter Debugger was back-ported.

There are some further JSInterpreter tweaks and a fix for a new linter rule in an unrelated extractor module.

dirkf added 5 commits June 19, 2024 19:04
* improve BODMAS (fixes ytdl-org#32815)
* support more weird expressions with multiple unary ops
* treat Infinity like NaN
* cache operator list
* no space after @ in decorator
@dirkf dirkf merged commit 4d05f84 into ytdl-org:master Jun 20, 2024
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[YouTube] Error 403 when downloading, with "Unable to decode n-parameter", not solved by new cookies
1 participant