开发者

youtube video link

I want to create a php application to download my films from youtube. For example:

page with video: http://www.youtube.com/watch?v=5dT312CDPJI link to video:

<a href="http://o-o.preferred.tpnet-waw2.v24.lscache1.c.youtube.com/videoplayback?sparams=id%2Cexpire%2Cip%2Cipbits%2Citag%2Cratebypass&fexp=904535%2C902314%2C910701&itag=22&ip=109.0.0.0&signature=A3C9407B96FF5D7548AFBCECFF248B90496CCDF7.5383C61DE0FFD40EEFA9090CB73C616ABF0E3C20&sver=3&ratebypass=yes&expire=1315674000&key=yt1&ipbits=8&id=e5d4f7d760833c92&title=Lykke+Li+开发者_开发百科-+Little+Bit+%28AutoErotique+Bootleg+Remix%29">video link</a>

But I can't find video link in page html. Where is the video link? Is it possible to do it in php?


Here's a script you can use for this

http://www.ngcoders.com/php/php-youtube-video-downloader-script


I'm not really sure if it is possible to extract direct video URL and download it using only PHP.

But, I think I have 2 possible path for you:

  1. Read and translate youtube-dl code into PHP
  2. Using Youtube API as mentioned by @Jleagle.

From this docs, you can extract detailed info using url:

    https://gdata.youtube.com/feeds/api/videos/5dT312CDPJI?v=2

There, you'll see a RTSP url. You need to process those stream using mencoder.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜