Looking through the site, every question uses an outdated method. How do the YouTube FLV downloader websites/applications do it?
I am trying to do this in PHP but the theory or steps to do it will suffice, thanks.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
As mentioned in other posts, you may want to look at our code in
youtube-dl (or in the code of the Firefox extension called
FlashVideoReplacer).
In the particular case of youtube-dl, the “real work” is done in the
subclasses of
InformationExtractorand it hard to give a “stable” answer,as the layout of such sites changes constantly.
There are some pieces of the information that are not dynamic, such as, for
instance, the uploader of the video, the title, the date of upload, and,
most importantly, the identifier of the video (a 11-character string).
For the dynamic parts, what can be said about such tools is that,
essentially, the URLs generated by such videos are dynamically generated and
you need to perform some back-and-forth communication with the server.
It is important to have in mind that what such sites can (and do) take into
consideration depend on a number of parameters, including: the cookies that
you have already received—as the case for HTML5 videos, your
geolocation—for regional control, your age–for “strong” material, your
language/locale—for showing content tailored to you, etc.
youtube-dl uses a regular expression to extract the video ID from the URL
that you give and, then, uses a “normalized”, typical URL as used from the
United States, from which to proceed.
Some of the dynamic data to be gathered includes:
expire, andfexpparts of the final URL)itagpart of the final URL)algorithm,burst,factor)signaturepart of the final URL)Some of the information listed above were once not required, but now they
are (in particular, the cookies that they send you). This means that the
information listed above is very likely to become obsolete, as the controls
become stricter.
You can see some of the work (with respect to the cookies) that I did in
this regard in the implementation of an external backend to use an external
downloader (a “download accelerator”) with what youtube-dl extracts.
Discloser: I have committed some changes to the repository, and I maintain
the
youtube-dlpackage in Debian (and, as a side effect, in Ubuntu).