YouTube 电影下载器如何工作?- YouTube [英] How does a YouTube movie downloader work? - YouTube

查看:43
本文介绍了YouTube 电影下载器如何工作?- YouTube的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在讨论 Video DownloadHelper 等应用的工作原理.

I'm wordering how apps such as Video DownloadHelper work.

有什么想法吗?

推荐答案

更新:此答案现在可能已过时,请参阅下面的评论. 无论如何,随着 YouTube 逐步淘汰 FLV,这最终会发生并转向 HTML5 视频...

UPDATE: This answer may now be outdated, see comments below. This was going to happen eventually anyway, as YouTube phases out FLV and shifts toward HTML5 video...

他们只需解析实际 FLV 文件的链接,然后下载即可.

They simply resolve the link to the actual FLV file, and download it.

这是通过从 URL 复制视频标识符来完成的:

This is done by copying the video identifier from the URL:

http://www.youtube.com/watch?v=WEeqHj3Nj2c

用于请求有关视频的信息:

Which is used to request info about the video:

http://www.youtube.com/get_video_info?&video_id=WEeqHj3Nj2c

视频信息包含一个 TOKEN,然后您可以使用它来发出另一个请求:

The video info includes a TOKEN, which you can then you use to make another request:

http://www.youtube.com/get_video?video_id=WEeqHj3Nj2c&t=TOKEN

如果一切顺利,YouTube 将使用 HTTP 303 See Other 进行响应,包括带有 FLV 文件直接链接的 Location 标头.

If all goes well, YouTube will respond with HTTP 303 See Other, including a Location header with a direct link to the FLV file.

这篇关于YouTube 电影下载器如何工作?- YouTube的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆