ytdl-org / youtube-dl

Command-line program to download videos from YouTube.com and other video sites
http://ytdl-org.github.io/youtube-dl/
The Unlicense
131.67k stars 9.97k forks source link

Cookies and Authentication not working on Brand Account (YouTube) #30993

Open rachelcsimmons-cda opened 2 years ago

rachelcsimmons-cda commented 2 years ago

Checklist

Question

I am trying to download 1) Private and 2) Membership videos from a YouTube Brand Account that my Google account is a manager on. I am not the primary owner, but in my browser, I have access to YouTube Studio and can see all of the private and channel membership videos.

Whether I use -username and -password authentication, or I use --cookies with the cookie downloader browser extension, it does not work. It gives me the same errors that I would get if I was not authenticated:

Private video
Sign in if you've been granted access to this video
This video is available to this channel's members on level: Level 3 (or any higher level). Join this channel to get access to members-only content and other exclusive perks.

What can I do to show youtube-dl that I am authorized?

dirkf commented 2 years ago

Unfortunately the likely answer is that you need to create and specify the cookie file better in some way.

An easy answer is that you mustn't use --username .../-u ... in order for the cookie authentication to work, but I suspect that you are ahead of that.

Have you been able to access YT content requiring a login before?

rachelcsimmons-cda commented 2 years ago

@dirkf correct that i only tried -u and -p separately from the cookies. I have not been able to access YT content requiring a login on youtube-dl before.

dirkf commented 2 years ago

You might like to check if yt-dlp can access the content. It has a --cookies-from-browser ... option to simplify specifying cookies and also a more sophisticated YT extractor.

Otherwise, I'd ask you to generate a HAR archive of your browser session in which you access each type of page (change your password before and after generating the HAR file).

cansurmeli commented 1 year ago

Due to Google, username/pass combo doesn't work. Use --cookies option instead with youtube-dl. Look into README for more.