Skip to content
This repository was archived by the owner on Apr 11, 2025. It is now read-only.

ray-1337/youtube-discord-embed

Repository files navigation

[DEPRECATED]

Warning

This project is no longer maintained due to YouTube installed a DRM to its system, and it's been a journey for me to find multiple solutions just to get it work.

YouTube Discord Embed

Embed YouTube video on Discord by pulling off YouTube video, and make it playable through embeds with OpenGraph/Twitter meta tags.

This project is highly inspired by FixTweet, and powered with Next.js/Vercel.

A final version of YouTube Discord Embed

Setup

  • Run pnpm install to install the dependencies.
  • Edit .env.example to .env
  • Edit COOKIE_BYPASS value by:
  • Then, use:
    • pnpm dev for development.
    • pnpm build and then pnpm start for production-ready.

Error Handling

In a week or two, YouTube starts to show an error such as 'Sign in to confirm you’re not a bot'.

You can handle this by:

  • Open your browser (a browser where you previously export those cookies above), login to your YouTube account, and starts by doing something such as watching a YouTube video.
  • Or, reset the COOKIE_BYPASS key value by redoing the Setup above.

Self-host

You can fork the repository, host it somewhere else, and change the domain.

Cloud-hosted domain

I also hosted the project for free on the cloud. You can use it by replacing youtube.com/watch or youtu.be with my domain.

License

MIT