YoutubeExplode icon indicating copy to clipboard operation
YoutubeExplode copied to clipboard

Age-restricted content cannot be parsed, 403 is returned

Open Aimeast opened this issue 1 year ago • 1 comments

Version

6.4.0.0

Platform

.NET8 / Windows 10 & Ubuntu 24

Steps to reproduce

var httpClient = CreateHttpClient(); // All browser cookies have been loaded
var youtube = new YoutubeClient(httpClient);
var video = await youtube.Videos.GetAsync("https://www.youtube.com/watch?v=rXMX4YJ7Lks"); // This Id was mentioned in #606

Exception: HttpRequestException: Response status code does not indicate success: 403 (Forbidden).

Details

I noticed that #606 solved the access to age-restricted content, but now it seems that age-restricted content cannot be parsed successfully, even with all cookies attached. I used the videoId="rXMX4YJ7Lks" modified by #606 for testing. I don't know where I used it wrong, or if parsing age-restricted content is not supported now.

Checklist

  • [X] I have looked through existing issues to make sure that this bug has not been reported before
  • [X] I have provided a descriptive title for this issue
  • [X] I have made sure that this bug is reproducible on the latest version of the package
  • [X] I have provided all the information needed to reproduce this bug as efficiently as possible
  • [ ] I have sponsored this project
  • [ ] I have not read any of the above and just checked all the boxes to submit the issue

Aimeast avatar Aug 24 '24 07:08 Aimeast

Yeah, it routinely gets broken by YouTube. Although it's weird that it doesn't work with cookies.

Tyrrrz avatar Aug 24 '24 14:08 Tyrrrz

Duplicate of #795

Tyrrrz avatar Sep 25 '24 14:09 Tyrrrz