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

[YouTube] Attempt to extract function from player only once #1095

Closed
wants to merge 2 commits into from

Conversation

FireMasterK
Copy link
Member

  • I carefully read the contribution guidelines and agree to them.
  • I have tested the API against NewPipe.
  • I agree to create a pull request for NewPipe as soon as possible to make it compatible with the changed API.

@FireMasterK FireMasterK added enhancement New feature or request youtube service, https://www.youtube.com/ labels Aug 12, 2023
@AudricV
Copy link
Member

AudricV commented Aug 12, 2023

Why not storing a boolean indicated whether the code has been successfully loaded instead? We would still need to reset it where the JavaScript code is reset (the missing part of your PR), so it seems we have a design issue.

@FireMasterK
Copy link
Member Author

Why not storing a boolean indicated whether the code has been successfully loaded instead? We would still need to reset it where the JavaScript code is reset (the missing part of your PR), so it seems we have a design issue.

The problem is we're failing to extract the function, rather than the code. When we extract the code, we also try to extract the function. If the code has been extracted, but the function has not, we have likely failed to extract the function in the past.

I can add a function to reset the JS extractor code.

@AudricV
Copy link
Member

AudricV commented Sep 21, 2023

Closing in favor of #1108, which should solve the issue raised by this PR and the design issue I raised too.

@AudricV AudricV closed this Sep 21, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants