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
[ADN] How can I fix the subtitle support for the ADN extractor? #22035
Comments
Why do you wanna add something that's already supported by youtube-dl ? You just need to type I should have read before posting a comment, your method of getting the key is quite nice, but could it be integrated into youtube-dl in any way? The last time someone asked for the key to be changed automatically every day, it was a categorical refusal. |
@asusagawa The key changes automatically every day I mentionned PhantomJS because the Openload extractor uses it. It is a scriptable headless browser, meaning it is a browser that has no interface and you can control it using python. (if you are familiar with Puppeteer; it is exactly the same thing) I don't really know exactly how PhantomJS is used in the openload extractor, but I see it as a pretty good solution for this problem.
could you please show me where you read this? Thank you! |
Yeah, I know, I've got a modified extractor to do that.
Should be a great idea if it's accepted.
Can't find it anymore but pretty sure that I've read this somewhere. |
do you mean it is supporting key changes? |
Yes, it'll change the key in the adn.py file if needed automatically. |
so you basically have an external program/script that changes the adn.py file |
I edited the issue too make it more clear. @remitamine sorry for the mention; but I think you might be able to help me here |
it's fine to use PhantomJS(using the common code from |
Thank you!! I'll post my questions here if I have any during implementation. |
PR is here #22150! |
What is this ? and : {links: {vostf: {,…}}, video: {id: "10210",…},…} |
Hello there i thinks this my problem here : so i try to get subtiles from ADN video : i got to try :
and the second with python 3
i got the same error UnicodeDecodeError: 'utf-8' codec can't decode byte 0xb4 in position 2: invalid start byte do u know how fix this thanks |
i want to fix this too :( |
Checklist
Question
Hello!
I want to fix the subtitle support in
adn.py
.The current situation is explained in #12724. Right now, there is a key hardcoded here in the code:
This key changes every day, so poeple have been modifying the extractor code in their installation to get the subtitle extraction working -- and they have been changing the key every day. This is obviously not user friendly.
Youtubedl should automatically get the key as part of the subtitle retrieval process, and that is what I want to implement.
I know I need a JS Interpreter since the remote JS file that has the key changes every day and you can't easily get it with a regex or something similar because the key doesn't appear in the code; it is the result of an obfuscated js computation.
Should I use PhantomJS or another interpreter to do it?
I've found that you can get the key by executing
when an episode page is loaded. That's kinda hacky but it works :p
There are many more ways to do it (like proxying the
CryptoJS
object before the domload
event)but I found no easier way than that, because the variable is deeply nested in obfuscated code.
More importantly; this code uses calls to videojs (one of the dependencies ADN uses) so I think this code won't break for while.
Thank you!
The text was updated successfully, but these errors were encountered: