I am writing a js+php software to make downloading of youtube videos much easier, but I encountered a following problem:
I get informations about video this way:
parse_str(file_get_contents("http://youtube.com/get_video_info?video_id=".$id),$info);
Now some of the videos returns: use_cipher_signature => True
, which i would like to bypass.
I've searched trouch the Web, but all i got was some posts from 2014. (this one contains good introduction to topic: Best approach to decode Youtube cipher signature using PHP or JS)
I know that i have to look at source of https://www.youtube.com/watch?v=cipheredID
, extract *base.js script and then find deciphering code in it, but *base.js is too much obfuscated for me.
Is there anyone who can help me?
And second question: Does algorithm od encoding/decoding signatures depends on location? Beceause mine is pl_PL(https://s.ytimg.com/yts/jsbin/player-pl_PL-vfluAB5bv/base.js) and for example US users will have different link en_US