How does the YouTube movie downloader work? - YouTube

I talk about how apps like Video DownloadHelper work .


Any ideas?

+7
html flash youtube video-streaming
source share
2 answers

UPDATE: this answer may be outdated, see comments below. This will happen in the end anyway, since YouTube disables FLV and moves on to HTML5 video ...

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

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

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

Used to request video information:

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

The video information includes TOKEN , which you can use to create another request:

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

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

+12
source share

Looking at the extension code, you can see that it does this with a regular expression that parses HTTP responses for different types of content. The code is in network-probe.js.

In particular, this is the use of the http-on-study-response event in the Firefox sdk add-on - https://developer.mozilla.org/en-US/docs/Observer_Notifications#HTTP_requests

0
source share

All Articles