I wonder how to get the direct url of youtube video. For example, when i analyzed the video code of https://www.youtube.com/watch?v=OrTyD7rjBpw
But it doesn't redirect to the youtube video, so i'm thinking that code is more obfuscated
I wonder how to get the direct url of youtube video. For example, when i analyzed the video code of https://www.youtube.com/watch?v=OrTyD7rjBpw
But it doesn't redirect to the youtube video, so i'm thinking that code is more obfuscated
There's a library for that, and a linux tool, called youtube-dl
and libquvi
, respectively, which support URL extraction from player pages. You can call youtube-dl -g https://www.youtube.com/watch?v=OrTyD7rjBpw
to get a URL pointing to the video.
Note that many CDNs won't give you a redistributable URL for a video -- instead, it's a URL that will only work for whoever requested the video.
Also note: there's not "one" video stream at a youtube page, but several ones, for different qualities and devices.