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] Fix throttling parameter decryption on Android #925

Merged
merged 1 commit into from
Sep 10, 2022

Conversation

Theta-Dev
Copy link
Contributor

@Theta-Dev Theta-Dev commented Sep 9, 2022

I finally found out why the ThrottlingDecryptor keeps failing on NewPipe, while all extractor tests are passing.
Android apparently uses a different regex engine than regular java (see this SO thread https://stackoverflow.com/questions/45074813/regex-pattern-error-in-android-when-matching-closing-brace).

That's why the regex used to extract the nsig function fails to compile with a syntax error on android, unless you escape the curly brace with a slash.

@AudricV AudricV added bug Issue is related to a bug youtube service, https://www.youtube.com/ labels Sep 9, 2022
Escape the curly brace in the regular expression used to parse the throttling
parameter decryption function to allow its compatibility on Android.
@AudricV AudricV changed the title [YouTube] Fix ThrottlingDecryptor regex parse error on Android [YouTube] Fix throttling parameter decryption on Android Sep 10, 2022
Copy link
Member

@AudricV AudricV left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I force-pushed to your branch to suppress the IDE warning about the redundant escape with a comment explaining why this is done, based on what you said in the PR body.

Thank you for finding this!

Copy link
Member

@Stypox Stypox left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great, lgtm :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Issue is related to a bug youtube service, https://www.youtube.com/
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants