-
-
Notifications
You must be signed in to change notification settings - Fork 485
[YouTube] Fix signature deobfuscation function name extraction #1290
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 signature deobfuscation function name extraction #1290
Conversation
92cd0b0
to
0e54ccb
Compare
At this point of time, I think, it makes sense to think about separating this "deobfuscation function name extraction" part of code (or even some more) into some form that could be easily updated without updating the app. |
Switches from the official NewPipeExtractor versions to a soft fork, allowing fixes and other improvements that have not yet been merged upstream. For now it just contains a fix for working with newer YT player versions and checks if a video is avialable. Ref: TeamNewPipe/NewPipeExtractor#1290 Ref: libre-tube#7113
Switches from the official NewPipeExtractor versions to a soft fork, allowing fixes and other improvements that have not yet been merged upstream. For now, it just contains a fix for working with newer YT player versions and checks if a video is available. Ref: TeamNewPipe/NewPipeExtractor#1290 Ref: libre-tube#7113 Ref: https://github.com/libre-tube/NewPipeExtractor
Switches from the official NewPipeExtractor versions to a soft fork, allowing fixes and other improvements that have not yet been merged upstream. For now, it just contains a fix for working with newer YT player versions and checks if a video is available. Ref: TeamNewPipe/NewPipeExtractor#1290 Ref: libre-tube/LibreTube#7113 Ref: https://github.com/libre-tube/NewPipeExtractor
Switches from the official NewPipeExtractor versions to a soft fork, allowing fixes and other improvements that have not yet been merged upstream. For now, it just contains a fix for working with newer YT player versions and checks if a video is available. Ref: TeamNewPipe/NewPipeExtractor#1290 Ref: libre-tube/LibreTube#7113 Ref: https://github.com/libre-tube/NewPipeExtractor Co-authored-by: reocat <[email protected]>
Hi @FineFindus thanks for working on this. |
Switches from the official NewPipeExtractor versions to a soft fork, allowing fixes and other improvements that have not yet been merged upstream. For now, it just contains a fix for working with newer YT player versions and checks if a video is available. Ref: TeamNewPipe/NewPipeExtractor#1290 Ref: libre-tube/LibreTube#7113 Ref: https://github.com/libre-tube/NewPipeExtractor
Not unless there is a corresponding PR here, but I'm also not aware of any fix. |
yt-dlp has it working but it still needs to be ported to NewPipeExtractor |
Switches from the official NewPipeExtractor versions to a soft fork, allowing fixes and other improvements that have not yet been merged upstream. For now, it just contains a fix for working with newer YT player versions and checks if a video is available. Ref: TeamNewPipe/NewPipeExtractor#1290 Ref: libre-tube/LibreTube#7113 Ref: https://github.com/libre-tube/NewPipeExtractor
I won't stop you from porting it :) |
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.
This doesn't work anymore, YouTube has changed again its code. Could you please update the regular expression you added to support latest YouTube JavaScript code?
0e54ccb
to
60d3b71
Compare
With the players I'm getting, this still finds the correct function, however the function structure itself has changed and now also relies on a global variable. Implemented support for it in 60d3b71. |
60d3b71
to
04deb5d
Compare
Updates the NewPipeExtractor to the lastest version of our fork to include the improvements to the signature and throttling issues. Ref: TeamNewPipe/NewPipeExtractor#1290 Ref: TeamNewPipe/NewPipeExtractor#1302
Updates the NewPipeExtractor to the lastest version of our fork to include the improvements to the signature and throttling issues. Ref: TeamNewPipe/NewPipeExtractor#1290 Ref: TeamNewPipe/NewPipeExtractor#1302
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.
Currently not working:
Failed to find pattern "(var [A-Z]='.*'.split\(";"\))"
org.schabi.newpipe.extractor.utils.Parser$RegexException: Failed to find pattern "(var [A-Z]='.*'.split\(";"\))"
at app//org.schabi.newpipe.extractor.utils.Parser.matchGroup(Parser.java:73)
at app//org.schabi.newpipe.extractor.utils.Parser.matchGroup(Parser.java:60)
at app//org.schabi.newpipe.extractor.utils.Parser.matchGroup1(Parser.java:49)
at app//org.schabi.newpipe.extractor.services.youtube.YoutubeSignatureUtils.getDeobfuscationCode(YoutubeSignatureUtils.java:95)
at app//org.schabi.newpipe.extractor.services.youtube.YoutubeJavaScriptPlayerManager.deobfuscateSignature(YoutubeJavaScriptPlayerManager.java:145)
at app//org.schabi.newpipe.extractor.services.youtube.YoutubeSignaturesTest.testSignatureDeobfuscation(YoutubeSignaturesTest.java:54)
at [email protected]/java.lang.reflect.Method.invoke(Method.java:580)
at [email protected]/java.util.Optional.ifPresent(Optional.java:178)
Adds a new regex to find the signature deobfuscation function, which works for the new `20830619` player. Closes: TeamNewPipe#1287 Ref: TeamNewPipe#1287 (comment)
Extracts the global variable used in newer signature deobfuscation functions, such as the one found in the `59b252b9` player.
04deb5d
to
1915dc6
Compare
Looks like the use allow case letters and single quotes now. Should now work again. |
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, I will update the mocks and then we can merge this :)
Adds a new regex to find the signature deobfuscation function that works for the new
20830619
player. The regex is taken from #1287 (comment), I suspect it originated from yt-dlp, as they use an almost identical one.Closes: #1287
Ref: #1287 (comment)