我想在 YouTube 上观看此视频,但我发现它嵌入在某个网站中。有没有办法从此嵌入的 URL 中检索 youtube.com URL?
<embed src="//www.youtube.com/get_player"
type="application/x-shockwave-flash" width="690" height="540" bgcolor="#FFFFFF"
flashvars="flvurl=http://redirector.googlevideo.com/videoplayback?id%3Dfcfaf45aa5d77dff%26itag%3D5%26source%3Dblogger%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1459608091%26sparams%3Did,itag,source,ip,ipbits,expire%26signature%3D274D3FE371C996B06F9CF1F41CAD353269BFD77B.3845BB34221EFFF332FFAA610F12D2FC75CD6D5E%26key%3Dck2"
allowfullscreen="true">
答案1
flashvars
获取之后列出的 URL flvurl=
。
http://redirector.googlevideo.com/videoplayback?id%3Dfcfaf45aa5d77dff%26itag%3D5%26source%3Dblogger%26app%3Dblogger%26ip%3D0.0.0.0%26ipbits%3D0%26expire%3D1459608091%26sparams%3Did,itag,source,ip,ipbits,expire%26signature%3D274D3FE371C996B06F9CF1F41CAD353269BFD77B.3845BB34221EFFF332FFAA610F12D2FC75CD6D5E%26key%3Dck2
使用类似的服务UrlDecode网站解码 url 的 %xx 部分。
http://redirector.googlevideo.com/videoplayback?id=fcfaf45aa5d77dff&itag=5&source=blogger&app=blogger&ip=0.0.0.0&ipbits=0&expire=1459608091&sparams=id,itag,source,ip,ipbits,expire&signature=274D3FE371C996B06F9CF1F41CAD353269BFD77B.3845BB34221EFFF332FFAA610F12D2FC75CD6D5E&key=ck2
然后使用类似的服务重定向侦探获取重定向。
http://r5---sn-q4f7sn7s.googlevideo.com/videoplayback?id=fcfaf45aa5d77dff&itag=5&source=blogger&app=blogger&ip=192.185.4.40&ipbits=0&expire=1459608091&sparams=expire,id,ip,ipbits,itag,mm,mn,ms,mv,nh,pl,source&signature=26F3DB9ADE1F7629D3516A87346AAEA3363438DF.46326FF4F9C90989B2918E881C388639A6EE1173&key=cms1&pl=18&redirect_counter=1&req_id=ee88483f2e0e38e&cms_redirect=yes&mm=30&mn=sn-q4f7sn7s&ms=nxu&mt=1457844832&mv=m&nh=IgpwcjAxLmRmdzA2KgkxMjcuMC4wLjE#sthash.82Eefku9.dpuf
此 URL 似乎是原始视频的直接链接。YouTube v=xxxxxxx
URL 的一部分可能是数据库条目的密钥。如果无法访问该数据库,您将无法将视频 URL 反转为 YouTube URL。(此外,您提供的嵌入代码与 YouTube 现在提供的嵌入代码有很大不同。)