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

Can't download videos that have suicide content warning #476

Open
4 of 6 tasks
fsfsdfcsef opened this issue Jul 30, 2024 · 13 comments · Fixed by #533
Open
4 of 6 tasks

Can't download videos that have suicide content warning #476

fsfsdfcsef opened this issue Jul 30, 2024 · 13 comments · Fixed by #533
Labels
bug Something isn't working

Comments

@fsfsdfcsef
Copy link

Version

v1.12.2

Platform

Windows 10

Steps to reproduce

Try to download this video:
https://www.youtube.com/watch?v=vcw5THyM7Jo
https://www.youtube.com/watch?v=vcw5THyM7Jo&rco=1

Details

It shows the following error when I try to download this video
捕获
捕获2

This video have suicide content warning
捕获3

Checklist

  • I have looked through existing issues to make sure that this bug has not been reported before
  • I have provided a descriptive title for this issue
  • I have made sure that this bug is reproducible on the latest version of the application
  • 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
@fsfsdfcsef fsfsdfcsef added the bug Something isn't working label Jul 30, 2024
@Tyrrrz Tyrrrz changed the title Can't download the video that have suicide content warning Can't download videos that have suicide content warning Aug 4, 2024
@ninianne98
Copy link

I experience similar behavior (403 Forbidden warning) if there is an age check on the video.

I have authenticated in the download tool, but I get a similar warning as to the issue described by the OP.

One of the LTT April Fool's videos: https://www.youtube.com/watch?v=dJwjqZZgcWk

If I am not logged into google with my desktop browser, I will be greeted with "Sign in to confirm your age This video may be inappropriate for some users." when trying to play the video.

@Tyrrrz
Copy link
Owner

Tyrrrz commented Oct 12, 2024

I have authenticated in the download tool, but I get a similar warning as to the issue described by the OP.

If you're authenticated, you shouldn't see the warning

@ninianne98
Copy link

ninianne98 commented Oct 12, 2024

I'd have thought so, but that is the behavior I am seeing.

I am using 1.13.3 - the win x64 bundle on windows 10. If there are as-yet "unreleased" fixes in a specific branch, I'm up for using that.

My daily driver browser is Firefox, when logged into google, I can play the video no problem, but if I access using Edge or Chrome, which I do not log into google on any regular basis, I am prompted with the age warning.

I did have an earlier issue where I tried downloading another video, and got a short alert along the lines of "video 'X' not available" vs the 403 Forbidden error stack, and in that case, was greeted with a "login to prove you are not a bot" when viewing in Edge or Chrome, and so, once I had logged in with the tool, the video downloaded no problem. I have remained logged into the tool, and have verified the login status using the authentication icon and dialog.

I'm up for some debugging if there's some breakpoints etc that might be likely suspects that might provide more details.

@viper-dark
Copy link

i'm having the same issues ver 1.13.3 ,winx64

@dragokas
Copy link

dragokas commented Oct 25, 2024

If you're authenticated, you shouldn't see the warning

It doesn't matter. The warning is displayed regardless you authenticated or not. However, if you already approved video once than you will no longer see the warning on such video.

@ninianne98
Copy link

It doesn't matter. The warning is displayed regardless you authenticated or not. However, if you already approved video once then you will no longer see the warning on such video.

I've already watched the LTT video in my browser ( https://www.youtube.com/watch?v=dJwjqZZgcWk - age restricted), authenticated into the tool, but it consistently gives me the forbidden 403, other videos without this restriction download fine. I pulled the source code, and using the main library + command line harness, it tells me I need to login, but when I use the actual download tool and authenticate, it cannot, and results in a 403.

@dragokas
Copy link

dragokas commented Oct 26, 2024

@ninianne98 browser & this app have separate cookies, so it has no effect on each other. Similar, if you would open same video in Chrome & Firefox. The walkaround might be having integrated in YoutubeDownloader browser like CefSharp, where user could manually press required buttons and pass cookies directly to YoutubeExplode, unless Tyrrrz find a way to inject javascript auto-click or on-fly modification of cookies if that's even possible.

@ninianne98
Copy link

ninianne98 commented Oct 26, 2024

browser & this app have separate cookies, so it has no effect on each other.

I'm well aware of each app/browser having their own cookies (it's even something I leverage on a regular basis), but was responding to the statement about if the video has already been approved, on the off chance that somehow my profile was linked to having watched/accepted the "risks" of watching the video. Thanks for the tip about CefSharp, seems like something worth checking out. The last time I did some C# driven browser manipulation was using the selenium web driver.

@dragokas
Copy link

@ninianne98 I suppose the approve is linked to account+cookie, not just account. You may try prove hypothesis by install/open already approved video in different browser.

Thanks for the tip about CefSharp, seems like something worth checking out.

Retrieving cookies from CEF may looks like this:

private async Task<List<System.Net.Cookie>> GetCookiesAsync()
{
    List<System.Net.Cookie> listNetCookie = new List<System.Net.Cookie>();
    var cookieContainer = new CookieContainer();
    var cookieManager = Cef.GetGlobalCookieManager();
    var cookies = await cookieManager.VisitUrlCookiesAsync("https://www.youtube.com", true);

    foreach (var cefCookie in cookies)
    {
        var cookie = new System.Net.Cookie(cefCookie.Name, cefCookie.Value, cefCookie.Path, cefCookie.Domain);
        listNetCookie.Add(cookie);
    }
    return listNetCookie;
}

Than, I don't have much knowledge on YoutubeExplode API. Perhaps something like passing into initializer: new YoutubeClient( cookie ).

@Tyrrrz
Copy link
Owner

Tyrrrz commented Oct 26, 2024

Please try the latest CI build, it should be fixed

@ninianne98
Copy link

ninianne98 commented Oct 26, 2024

Please try the latest CI build, it should be fixed

Well, I pulled latest master branch for YoutubeDownloader, and I can see that the Explode package is updated and then tried running the code. I confirmed that I am authenticated, but I still get the 403 Forbidden when I try to grab the video (v=dJwjqZZgcWk or v=EjlC2rLbx7A). I made sure to perform a clean solution before running.

As a validation that the existing downloading was still working fine, I used several videos previously downloaded and the tool grabbed the thumbnails & downloaded fine, when age restriction is not in place.

@Tyrrrz Tyrrrz reopened this Oct 26, 2024
@Tyrrrz
Copy link
Owner

Tyrrrz commented Oct 26, 2024

Does it also not work if you're not authenticated?

@ninianne98
Copy link

Does it also not work if you're not authenticated?

Behavior is the same whether I am signed in with the tool to Google or not.

Interestingly, if I am using a list of videos, the thumbnail & title for the restricted videos are retrieved, and they simply appear as failed in the status/result list, but when trying to obtain them singly, it returns the 403 forbidden error stack and does not provide the usual thumbnail and quality selector dialog.

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

Successfully merging a pull request may close this issue.

5 participants