本文介绍了使用PHP或JS解码Youtube密码签名的最佳方法的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 当字典中的 use_cipher_signature = true 通过 http://www.youtube.com/get_video_info?&video_id=Video_Id 示例id:_JQH3G0cCtY Example id: _JQH3G0cCtY加密签名实际上是加密签名,任何人都可以通过几组工作签名进行调试。但是Youtube继续改变争夺战的算法。 我见过几个Youtube视频下载器,它们运行顺畅而不会受到这种变化游戏的影响。我认为他们正在检查播放器并从播放器文件中提取解码脚本,因此它会让它们继续运行。Ciphered signature is actually the scrambled signature which anybody can debug with few sets of working signatures. But Youtube keeps on changing the scrambling algo. I have seen few Youtube video downloader which are working smoothly without being affected through this changing game. I think they are checking the player and extracting the decode script from the player file and hence it keeps them going.我需要一些关于实际技术的帮助案件。我知道'youtube-dl' - 一个下载视频的python程序。由于我不擅长python,我认为他们使用相同的方法。I need some help about the actual technique to use in this case. I am aware of 'youtube-dl' - a python program to download the videos. As I am not good in python, I think that they are using the same approach.此处还有一个用户脚本JS文件: http://userscripts.org/scripts/show/25105 ,它正在做同样的事情。 Also there is a user-script JS file available here:http://userscripts.org/scripts/show/25105 , which is doing the same thing. 任何有关解码PHP或JS中的密码的理智方法的帮助都将不胜感激。Any help about the sane approach to decode the cipher code in PHP or JS will be appreciated.推荐答案网址结构和密码不断改变Youtube。目前,解密密码签名的最佳方法解释如下:Url structure and cipher code keeps on changing by Youtube. Presently, the best approach to decode the cipher signature is explained below: Youtube中的加密签名只是加扰签名,您必须根据现有的算法重新排列它们在播放器文件(HTML5播放器或Flash播放器)中。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).例如 http://www.youtube.com/watch?v=UxxajLWwzqY 目前正在使用以下HTML5播放器文件: //s.ytimg.com/ yts / jsbin / html5player-vfltdb6U3.js 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在此文件中,您可以通过搜索sig轻松搜索签名解密代码。在这种情况下,Algo是: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};以上是解密代码。但请注意,它在更改播放器文件时会不断更改,因此您必须点击正在使用的播放器文件。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.还要使用密码下载视频您必须使用相同的用户代理标头,从同一IP地址发送请求,并在提取后立即发送请求,签名。所有这些都是或在某些时候被要求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如果对密码解密算法感兴趣,请访问 CipherAPI If interested in cipher decryption algo, please visit CipherAPI另一个很酷的API: TYstream API Another cool API: TYstream API 这篇关于使用PHP或JS解码Youtube密码签名的最佳方法的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-25 06:41