Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.
Sign upGitHub is where the world builds software
Millions of developers and companies build, ship, and maintain their software on GitHub — the largest and most advanced development platform in the world.
[youtube] Decrypt signature in dash manifest urls #2393
Comments
|
Wouldn't looking at this code http://userscripts.org/scripts/review/25105 help, it's working there. |
|
I think is licensed under the MIT, so I don't really know if we can directly take the code and implement it in python. |
|
I checked the above userscript with almost 10 videos now and every one of them is showing 256kbps stream and is getting downloaded fine. |
|
@jaimeMF I guess it would be fine to learn how that script is decrypting things and implement a version of it here. After all that's what open-source is for. |
|
Applying the diff above does work for me. No 403 error anymore and the manifest and the actual files are downloaded just fine. |
|
You're right, but for example IB3lcPjvWLA fails, do you know of other urls that work? |
|
I've checked a bit more: The one I tried (07FYdnEawAQ) is age restricted, the other one (IB3lcPjvWLA) is not. youtube-dl uses different code paths for these two cases (lines 1136). So I can only assume the problem lies here: does not work properly to get the right manifest, while the other one does. |
|
Ok, the above is not quite correct, the actual problem is in the signature decoding: When I set In this case the So the static signature decoding seems to work, while the other one does not. |
|
Fixed with d68f0cd |
The url contains
/s/B38340F3A368A1038B2F9A2698C3F52390282B9D2B1.1702A8F0F542DCB59484A235159267866D0A0F6CF6C, there should be some way of decrypting it. I have tried with the following change:But it sill gives a 403 error when trying to download it, I've also tried using the static algorithms from the current version and older.
Downloading it would probably allow to get more formats (see #1955)