开发者

How to get the direct download link from the url of video sharing web sites?

How can i get the direct link of flv from the specified url in javascript? I got a PHP script to do the same. This is only for youtube

What it does is:

  • do some pattern matching and create a new url http://www.youtube.com/get_video?video_id=xyz&t=开发者_如何学Pythonabc
  • now use this new url and again by some pattern matching find the direct link.

Now how can we do the same in javascript? Also, is it possible to make a single javascript file to get the direct download link from all video sites. [ all means popular websites :) like, youtube, google video ... ]

Edited after Toby's answer

- As according to Toby, it is not possible/feasible to create a single javascript file ,which can support all video sites, to get the download link. then isn't it possible to get the download links from youtube only.


There will not be one specific way that you can generate correct URLs for multiple websites, each website has its own way of generating URLS. Neither is there necessarily any way to directly download a video from the site, many Videos can only be streamed which means that there is no file to download. Then the ones that are streamed can only be read by the specific player they are designed for.

Basically I'm afraid what you wish to do is not really feasible in any language.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜