⚙️ Setup
YouTube Cookies

YouTube Cookies Setup

This document explains how to retrieve and use cookies from YouTube authentication for getting the subtitles from the available YouTube videos. Cookies are essential for accessing certain YouTube features and content that may be restricted or unavailable without proper authentication.

Why Cookies are Needed

YouTube uses cookies to authenticate users and manage sessions. By providing these cookies to our application, we can:

  1. Access age-restricted content
  2. Retrieve private videos (if the authenticated user has access)
  3. Access region-restricted content (based on the authenticated user's location)
  4. Potentially bypass some rate-limiting restrictions

Step-by-Step Guide to Retrieve Cookies

1. Install the EditThisCookie (opens in a new tab) Extension

  1. Open your preferred browser (Chrome, Firefox, or Edge).
  2. Go to the browser's extension store. For Google Chrome visit the extension here (opens in a new tab).

2. Create a New YouTube Account

It's recommended to create a new YouTube account specifically for this purpose to keep your personal account separate.

3. Log in to YouTube

4. Export Cookies

  1. Make sure you're on a YouTube page.
  2. Click on the EditThisCookie extension icon in your browser toolbar.
  3. In the extension popup, click on the export button (usually looks like an arrow pointing outward).
  4. The cookies will be copied to your clipboard in JSON format.

5. Update the Youtube Cookies File

  1. Open the src/utils/youtube-cookies.ts file in your project.
  2. Replace the example cookie array with the actual cookies you exported:
Remove Layout Login Check

Security Considerations

  1. Never share your cookies: They provide access to your YouTube account.
  2. Use a dedicated account: Don't use cookies from your personal YouTube account.
  3. Regularly rotate cookies: Update your cookies periodically to maintain security.
  4. Store securely: Never commit cookies to public repositories. Use environment variables or secure secret management systems in production.

Remember, using cookies responsibly and ethically is crucial. Always respect YouTube's terms of service and content creators' rights.