-
Notifications
You must be signed in to change notification settings - Fork 425
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] Parse and execute deobfuscation code without JavaScript #529
Conversation
There's a strange unrelated error when I try that apk: Exception
Crash log
The implementation code wise seems to be good. (From a glance) |
@FireMasterK oh, I uploaded the wrong apk, sorry. I updated it now. |
It works great! It also appears that it might also decipher these videos faster too. (Likely due to not needing to recreate a script context everytime.) |
Yeah, that's the whole point :-D |
I just want to add, Invidious does this already so I think it should be safe to merge |
@Stypox can you rebase and see if the test pass? |
@XiangRongLin it passed! The stream urls could still lead to 404 errors due to a wrong deobfuscation, since that's not tested, but the deobfuscation process would have probably raised an |
I'm going to use the app with this extractor for the next few days. If nothing comes app, it can be merged |
YouTube has already updated their deobfuscation code once since this PR was opened, it should be safe imo if it still works :D |
final String[] stringSteps = deobfuscationCode.split(containerName + "\\."); | ||
boolean first = true; | ||
cachedDeobfuscationFunctions = new ArrayList<>(); | ||
for (final String step : stringSteps) { |
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.
Since this is an array you can just use a for i
loop with i=1
instead of the weird first=true
setup
This occured in my preunified version with this extractor. I searched for the video and clicked on it. then the error came. it works on my preunified with extractor v0.20.10 and yesterday it worked too on deobf extractor Exception
Crash log
|
this one too https://www.youtube.com/watch?v=WDH_nJM3djc. Search query: summer joe Other videos work, as far as i tried Edit: Now it's working again |
This will become redundant if we implement #562 |
See #520 (comment)
I don't know if this can be merged safely, it is more of an experiment. @FireMasterK
This is the JS this PR parses, which is built by
loadDeobfuscationCode()
:Debug APK: app-debug.zip