Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Access to rr4---sn-qxaeenlz.googlevideo.com was denied (Status code: 403) #31

Closed
msalik42 opened this issue Jul 12, 2024 · 28 comments
Closed
Labels
bug Something isn't working

Comments

@msalik42
Copy link

Ran the following code and it returns the video URLs, But when I try to access the files, it says access denied
const ytdl = require("@distube/ytdl-core");

ytdl.getBasicInfo("https://www.youtube.com/watch?v=eFe8bJ9e_FA").then((info) => {
console.log(info);
});

@msalik42 msalik42 added the bug Something isn't working label Jul 12, 2024
@Pesepvtltd
Copy link

have you got solution?

@skick1234
Copy link

Due to recent youtube changes, you have to update to the latest version and download the stream from the same ip (and maybe the cookies). So if you want to download it from another client, you have to download it to your server and use other methods to download it from your server.

@skick1234 skick1234 changed the title Access to rr4---sn-qxaeenlz.googlevideo.com was denied Access to rr4---sn-qxaeenlz.googlevideo.com was denied (Status code: 403) Jul 14, 2024
@Lampropoulosss
Copy link

The issue is that I use the library on the server and I stream the video to my client myself. So, no other IP is used or anything. And it still, randomly, throws the error.

@skick1234
Copy link

It seems youtube blocked download some itag, try changing the format, quality or filter options

@mtripg6666tdr
Copy link

mtripg6666tdr commented Jul 15, 2024

FYI this issue may be related to this pr

@pauliusdotpro
Copy link

I've also started getting issues

@Raul824
Copy link

Raul824 commented Jul 23, 2024

Well after fiddling with all permutations and combinations my assumption is there is some kind of protection on official channels or some strings.

So If i tried to getinfo of official music video the stream gives 403 error but if I do a getinfo of same song uploaded by someone else it works.

example.
This doesn't work
https://www.youtube.com/watch?v=eFjjO_lhf9c

This works
https://www.youtube.com/watch?v=1i0i5lG6Ojc

@msalik42
Try same thing on reaction video of the original video.

@vasanth-raja
Copy link

403 fixed or any solutions yet?

@skick1234
Copy link

I disabled cache on 4.13.7, 403 is gone on my side but I don't know if it works on every video. Please try it and give feedback.

@enamtujuh
Copy link

I disabled cache on 4.13.7, 403 is gone on my side but I don't know if it works on every video. Please try it and give feedback.

image
all format quality etc , 403 at all
but this happend for some videos not all videos

@skick1234
Copy link

image

all format quality etc , 403 at all

but this happend for some videos not all videos

Can you give me video url and your ip location as well?

@enamtujuh
Copy link

Can you give me video url and your ip location as well?

https://youtu.be/ozckx6_Z2a4
ip loc : Germany

@vasanth-raja
Copy link

i switched to another package thats working at the moment, but docs are not easy to pick up
https://github.com/LuanRT/YouTube.js/blob/main/examples/download/index.ts

@skick1234
Copy link

Can you give me video url and your ip location as well?

https://youtu.be/ozckx6_Z2a4 ip loc : Germany

Weird, I don't have any problem with it, can you test with browser headers like user-agent, origin,... and cookies.
I don't have 403 problem with your video

@fsholehan
Copy link

Now, the local environment is also getting a 403 error.

@Lampropoulosss
Copy link

i switched to another package thats working at the moment, but docs are not easy to pick up https://github.com/LuanRT/YouTube.js/blob/main/examples/download/index.ts

Doens't work. Tried it with a few videos, for most of them it logs "server responded with not a 2.x.x status code

@alanor87
Copy link

alanor87 commented Aug 1, 2024

The same - 403 on some videos - others are being downloaded normally.

https://www.youtube.com/watch?v=6OZQ9Y2c1kY - works

https://www.youtube.com/watch?v=FavdK4bv56Q - does not work

@Lampropoulosss
Copy link

Does this issue appear to other libraries / tools too? Such as yt-dlp, youtube-dl etc?

@nukeop
Copy link

nukeop commented Aug 1, 2024

After I updated to the newest release, these problems are completely gone.

@fsholehan
Copy link

After I updated to the newest release, these problems are completely gone.

Yes, but with the same video, sometimes it returns a 403 error, and sometimes it works.

@yyildiz
Copy link

yyildiz commented Aug 2, 2024

Are you on the latest @fsholehan?

@nukeop
Copy link

nukeop commented Aug 2, 2024

Suddenly 403s are back, with almost every single stream.

@fsholehan
Copy link

Are you on the latest @fsholehan?

Yes, I'm on the latest version

@skick1234
Copy link

It looks like YouTube is conducting A/B testing to prevent bots. I’ll look into their anti-bot token and update the package after my working hours.

@red1ul
Copy link

red1ul commented Aug 2, 2024

It looks like YouTube is conducting A/B testing to prevent bots. I’ll look into their anti-bot token and update the package after my working hours.

Please refer to the following URL: https://x.com/justusecobalt/status/1799043789967036620

@Marbanz
Copy link

Marbanz commented Aug 2, 2024

I did some testing and found out that using cookies of a yt premium account doesn't give errors, while without cookies or with the cookies of a non premium account it gives the 403 error

@DevBelkin
Copy link

I did some testing and found out that using cookies of a yt premium account doesn't give errors, while without cookies or with the cookies of a non premium account it gives the 403 error

I also tried with the premium account and it works without any error.

@Brainicism
Copy link

Brainicism commented Aug 4, 2024

yt-dlp/yt-dlp#10457
Not sure if you've seen this already, yt-dlp mitigated this by swapping to a non-web client.

Also: yt-dlp/yt-dlp#10648

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests