-
-
Notifications
You must be signed in to change notification settings - Fork 194
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
Age Restricted Youtube Video Support #997
Comments
No, but happy to accept a PR for this. |
Afaik there's no way of directly accessing restricted videos from the YouTube API without being logged in. In other words, you'll have to pass a YouTube account credentials by exporting your browser cookies and passing it to the client. This incidentally also allows accessing private/membership required videos/streams as long as the credentials allows it. Quick search through code tells me you need to pass the cookie as a header here muse/src/services/youtube-api.ts Lines 67 to 73 in cc1f18b
and the generated header should look something like this |
What about the ytdl library? I've used ytdlp (Python fork) in some personal projects and age-restricted video downloads work as intended. |
@Happyllama25 I've worked with yt-dlp before. Passing cookies to the client is the way. It's straight forward in code too, but since this project is written in typescript and doesn't rely on yt-dlp at all, we'll have to do on our own. But the proof of concept above should work. Edit: you may have been on to something. It does work, sort-of by spoofing a TV client (?) Discussion on reddit here but apparently it's not foolproof if the owner of the video disables the option |
Is it possible to allow the bot to search (and play) age-restricted content on youtube? Could not find a setting on the generated API key to allow for age restricted content to be viewed.
The text was updated successfully, but these errors were encountered: