-
Notifications
You must be signed in to change notification settings - Fork 422
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 extraction of more complex nsig functions #891
Conversation
So fast \o/ Thanks for the fix :) |
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.
Thank you very much!
A few code style issues are present, but if you tested yourself and it works, I think that's fine :)
Could you also apply TeamNewPipe/NewPipe#8760 (comment) if possible, so #786 is finally doing its job? Thank you in advance!
Edit: I will do all the changes myself
extractor/src/main/java/org/schabi/newpipe/extractor/utils/StringUtils.java
Outdated
Show resolved
Hide resolved
extractor/src/test/java/org/schabi/newpipe/extractor/utils/StringUtilsTest.java
Outdated
Show resolved
Hide resolved
So we'll just wait for merging and making new release |
Yes, but I'd like to fix TeamNewPipe/NewPipe#8713 on the fly, by merging #890 once I updated mocks, as it would be great if we don't have to make a second hotfix release :) |
This comment was marked as resolved.
This comment was marked as resolved.
…thesis This is required to extract fully more complex YouTube nsig functions.
b672d37
to
aaab05c
Compare
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Here is a test build of NewPipe if you want to try the fix: |
… improve docs This will prevent any future extractor break due to decryption failure, like it was excepted to be the case before. Some documentation about the throttling decryption has been also improved.
aaab05c
to
5b54834
Compare
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.
LGTM!
} | ||
break; | ||
case '\'': | ||
case '"': |
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.
The grave character (`) should also probably be included since they can be used to create multi-line strings.
Thank you again for your contribution, @Theta-Dev! |
...in/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java
Show resolved
Hide resolved
...in/java/org/schabi/newpipe/extractor/services/youtube/extractors/YoutubeStreamExtractor.java
Show resolved
Hide resolved
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
I want to thank you from the bottom of my heart 🥇 |
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as spam.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
This comment was marked as off-topic.
In TeamNewPipe/NewPipe#8760 (comment), @AudricV indicates:
If I'm reading this correctly, it sounds like the exception handler wasn't working because it was only detecting (and thus handling) ParsingExceptions instead of all exceptions. It appears the above recommendation may a good one because it will handle possible situations in the future that are similar to this issue. In addition to the recommendation made in the above quote, it seems logical to also handle the new upstream string format so that no exception is generated (which will therefore handle throttling as intended within NewPipe). Has this already been done, or is that a separate task that needs to be completed? |
I already included this in 5b54834 😉 |
I fixed the "Could not get any stream" error that occurred after a YouTube update on 12.08.2022.
The issue was that the more complex nsig decryption function now includes curly braces inside strings, which the
findNextParenthesis
function could not handle. This resulted in the extraction of broken JavaScript and an interpreter error.Fixes TeamNewPipe/NewPipe#8760.
This PR also catches really this time throttling errors, to really prevent extraction issues when the throttling parameter could not be decrypted.
Test APK: app-debug.zip