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.
We need a sane approach to encrypted signatures #948
Comments
|
The |
|
I am using the "_decrypt_signature" function from youtube extractor in an Android app, but since it changes all the time I needed a different approach (to avoid to push a new release on every change). In addition, I wrote a simple class "YoutubeSelenium.java" for test automation, you need to provide videos id through "addYoutubeId" and start testing with "execute". It produces a simple HTML page with test results in "testResult" folder. Do you have any videos to test all signatures length ? This is rather a draft, the code can be greatly improved. |
|
Hi, previously I also copied the _decrypt_signature function to use in my project, pafy (python api for youtube). It resulted in too many updates, so recently I wrote some python code to use regexp's to extract and parse the javascript decryption functions and process the signatures in python. This way does not use eval/exec (which I prefer not to use) and has worked for the last few signature changes. Feel free to take a look for ideas in using with your Android app. https://github.com/np1/pafy/blob/master/pafy.py#L41-L119 |
|
Hello ! |
|
Yes I have seen that too. It's somewhat different, it generates python code from the javascript code. It could potentially facilitate an arbitrary code execution type attack but it is more versatile and requires less processing of the original javascript. Both approaches have their advantages/disadvantages. |
|
@dentex Thanks, but we just forgot to close this issue. We have automatic signature extraction for quite a while. |
|
Oh! Great. |
We need a good way to handle:
UnavailableVideoErrorsucks), making it easy for the user to report useful info