Reputation: 259
I am planning to create video downloader plugin.So basically we need signatures to download an video file from youtube.I referred other working plugins..They convert the signature to some format.
Basically orginal signature in youtube page source is
BBB4D55F9CF4387F77958A6960CA96708C73AB59B.037D413F53291E957891898307BBF1C41B6037D77D7
Plugins convert the above signature to below signature.
BB4D55F9CF4787F77958A6960CA96708C73AB59B.037D413F53291E957891898307BBF1C41B6037D3
I want to know is these some kind of hash ? has any one came across similar hash ?
Upvotes: 1
Views: 4264
Reputation: 3513
now a days you can easily create your own youtube downloader via youtube-dl. It also support more than youtube. I also made a tutorial on how to do this. You can read more about that here
Upvotes: 0
Reputation: 1104
Secret of Cipher Signature code:
Ciphered signature in Youtube are just 'scrambled' signature that you have to rearrange them according to the Algorithm present in the player file (HTML5 player or Flash player).
For example http://www.youtube.com/watch?v=UxxajLWwzqY
is presently using the following HTML5 player file : //s.ytimg.com/yts/jsbin/html5player-vfltdb6U3.js
in this file you can easily search for signature decipher code by searching for 'sig'. Here in this case the Algo is:
function bz(a) {
a = a.split("");
a = cz(a, 61);
a = cz(a, 5);
a = a.reverse();
a = a.slice(2);
a = cz(a, 69);
a = a.slice(2);
a = a.reverse();
return a.join("")
}
function cz(a, b) {
var c = a[0];
a[0] = a[b % a.length];
a[b] = c;
return a
};
Above is the deciphering code.
But be aware, it keeps on changing when they change the player file, so you have to keep a tap on the player file being used.
Also to download videos with cipher signature you have to take care of the sending the same cookies, using the same user-agent header, sending the request from the same IP address, and sending the request shortly after extraction. All these are or were required at some point
For more check this API: Cipher API
Another cool API: YTstream API
Upvotes: 3
Reputation: 129
you can follow on github the youtube-dl python application: it's the best small command-line program to download video that i've found so far, with a great team behind. More specifically, you can visit the youtube-script , in order to grab the latest working decyphering algorithm.
Have fun :)
Upvotes: 1