dongsetan3216 2013-08-22 15:11
浏览 52

如何从此阵列获取youtube下载链接

I have a PHP script that returns the youtube's url_encoded_fmt_stream_map into arrays

this is an example of one of those arrays

Array
(
[quality] => hd720
[itag] => 45
[url] => http://r7---sn-25ge7n7l.c.youtube.com/videoplayback?source=youtube&expire=1377205488&cp=U0hWTFJLU19NUkNONl9KRVdFOlFROHcyQXZRVzMw&sver=3&mt=1377182899&itag=45&id=f3a24c732e4ea990&upn=aBSr1FoD9WM&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&fexp=919112%2C919363%2C914074%2C916624%2C909546%2C906397%2C929117%2C929121%2C929906%2C929907%2C929922%2C929127%2C929129%2C929131%2C929930%2C925720%2C925722%2C925718%2C929917%2C929919%2C929933%2C912521%2C919206%2C932306%2C913428%2C920605%2C904830%2C919373%2C930803%2C908536%2C904122%2C938701%2C911423%2C936308%2C909549%2C900816%2C912711%2C904494%2C904497%2C900375%2C906001&ipbits=8&ratebypass=yes&ip=31.170.160.74&key=yt1&ms=au&mv=u
[fallback_host] => tc.v23.cache8.c.youtube.com
[type] => video/webm; codecs=\"vp8.0, vorbis\"
[sig] => 1A6118D09B20DCD2CD068CAD2415C6BFF80FF5F0.5FB3424173B8FABE7379689138DFA7038B5F11B4
)

how can i put these informations together to make a valid download link ?

any help will be much appreciated and thanks in advance

  • 写回答

1条回答 默认 最新

  • doufen9815 2013-09-05 11:04
    关注

    The download url is already there in the result, for example :

    http://r7---sn-25ge7n7l.c.youtube.com/videoplayback?source=youtube&expire=1377205488&cp=U0hWTFJLU19NUkNONl9KRVdFOlFROHcyQXZRVzMw&sver=3&mt=1377182899&itag=45&id=f3a24c732e4ea990&upn=aBSr1FoD9WM&sparams=cp%2Cid%2Cip%2Cipbits%2Citag%2Cratebypass%2Csource%2Cupn%2Cexpire&fexp=919112%2C919363%2C914074%2C916624%2C909546%2C906397%2C929117%2C929121%2C929906%2C929907%2C929922%2C929127%2C929129%2C929131%2C929930%2C925720%2C925722%2C925718%2C929917%2C929919%2C929933%2C912521%2C919206%2C932306%2C913428%2C920605%2C904830%2C919373%2C930803%2C908536%2C904122%2C938701%2C911423%2C936308%2C909549%2C900816%2C912711%2C904494%2C904497%2C900375%2C906001&ipbits=8&ratebypass=yes&ip=31.170.160.74&key=yt1&ms=au&mv=u

    will be the url you are looking for in above. This url will change with every request and also only available from the IP which requested it.

    评论

报告相同问题?

悬赏问题

  • ¥15 微信会员卡等级和折扣规则
  • ¥15 微信公众平台自制会员卡可以通过收款码收款码收款进行自动积分吗
  • ¥15 随身WiFi网络灯亮但是没有网络,如何解决?
  • ¥15 gdf格式的脑电数据如何处理matlab
  • ¥20 重新写的代码替换了之后运行hbuliderx就这样了
  • ¥100 监控抖音用户作品更新可以微信公众号提醒
  • ¥15 UE5 如何可以不渲染HDRIBackdrop背景
  • ¥70 2048小游戏毕设项目
  • ¥20 mysql架构,按照姓名分表
  • ¥15 MATLAB实现区间[a,b]上的Gauss-Legendre积分