Noble
Noble

Reputation: 51

Why am I not able to wget these types of links?

https://r4---sn-a5m7lnek.googlevideo.com/videoplayback?requiressl=yes&id=bfcd54f32577fad7&itag=22&source=webdrive&app=texmex&ip=2605:e000:608a:400:f4cd:ff6:3353:dcc&ipbits=8&expire=1464424582&sparams=expire,id,ip,ipbits,itag,mm,mn,ms,mv,nh,pl,requiressl,source&signature=1701A7336E5CB650393D0AE2FC4B24388F033594.7795C4BFED9863E57BBADCA3ACD8FF33D79A8018&key=cms1&pl=32&cms_redirect=yes&mm=31&mn=sn-a5m7lnek&ms=au&mt=1464414847&mv=m&nh=IgpwcjAzLmxheDAyKgkxMjcuMC4wLjE

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

Answers (1)

VC.One
VC.One

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

Related Questions