Reputation: 51
I am wondering what is preventing me from wgeting this file. When I look at it, it is a video on a page right...?
When I try to wget (or youtube-dl), it gives me this error: ERROR 403: Forbidden.
but why?
Upvotes: 1
Views: 1389
Reputation: 15906
Why am I not able to wget these types of links?
Because they are not valid Youtube links that Youtube-dl can use... It wants a browser link (page) but here you give it a file download link.
If your link does not include youtube.com/watch?v=
you will never be able to wget
that link.
Also, sorry for asking, but what did you mean by "passing through youtube-dl"? Did you mean
youtube-dl r4---sn-a5m7lnek.googlevideo.com/…;
?
A Youtube link is always presented as https://www.youtube.com/watch?v=VIDEO_ID
.
For example where VIDEO_ID is something like Dm_xLDvCrNI
.
The full link to pass to Youtube-dl is :
https://www.youtube.com/watch?v=Dm_xLDvCrNI
It was not a Youtube direct file link...
If your link begins https://r4---
then it is actually a direct link to the file on Youtube server. This is what Youtube-dl itself gets when you give it a Youtube video link & then allows you to save the file.
Youtube servers begins like example https://r2---
and go upwards to https://r9---
For example with this video : The MP4 direct file link is shown below (play in browser or save file) :
https://r2---sn-5uaeznzk.googlevideo.com/videoplayback?ipbits=0&ratebypass=yes&key=yt6&upn=oGVhc2fiEPA&fexp=9405824,9416126,9416891,9421734,9422596,9428398,9429044,9431012,9432028,9432379,9432683,9432971,9433096,9433655,9433946,9434802,9435329,9435527,9435850,9435876,9436051,9437067,9437323,9437403&itag=18&mn=sn-5uaeznzk&pl=23&source=youtube&mm=31&ip=108.62.18.190&mime=video/mp4&requiressl=yes&expire=1464594226&mv=m&mt=1464572379&ms=au&id=o-AAoZ2sMU-9ULInZjN6ugmhG_8hBJeCQC1J7r9oDtZAKc&lmt=1458188004221288&sparams=dur,id,initcwndbps,ip,ipbits,itag,lmt,mime,mm,mn,ms,mv,nh,pl,ratebypass,requiressl,source,upn,expire&signature=10879388ACE74DA8C035A2D6723656A57268B106.A6BA3A7DFFD8EF6A168572F838F63DCADADFEE67&dur=149.652&initcwndbps=8983750&sver=3&nh=IgpwcjA0LmF0bDIyKg03Mi4xNC4yMTMuMTkz&title=Zootropolis+-+UK+Trailer+2+-+OFFICIAL+Disney+%7C+HD
PS: Link may not work by the time you read this, but the point is made about differences of expected links & what a direct link looks like.
Upvotes: 1