Skip to content

Instantly share code, notes, and snippets.

@gamer191
Last active June 18, 2025 18:13
Show Gist options
  • Save gamer191/ddf0b23b0a6df8e2ffe81bd1dda9154c to your computer and use it in GitHub Desktop.
Save gamer191/ddf0b23b0a6df8e2ffe81bd1dda9154c to your computer and use it in GitHub Desktop.

Instructions for YouTube:

There is a small chance your account could be banned. DO NOT login with an important Google account (such as an account you use for Gmail)

If yt-dlp is asking you to log in, first try running --update-to nightly to see whether it fixes the issue!

Export cookies automatically (this works on MacOS and Linux, but it only works on Windows if you use Firefox):

  1. Log into YouTube in your browser

  2. Add --cookies-from-browser BROWSER to your command, replacing BROWSER with the name of your browser (eg safari)

Export cookies automatically on Firefox forks (eg Waterfox):

  1. Log into YouTube in your browser

  2. visit about:profiles

  3. copy the "Root Directory"

  4. Add --cookies-from-browser "firefox:ROOT" to your command (eg --cookies-from-browser "firefox:C:\Users\username\AppData\Roaming\Mozilla\Firefox\Profiles\12345678.default-release")

Export cookies manually (on Chromium-based browsers):

  1. Install https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc

  2. Enable "Allow in incognito" in chrome://extensions/?id=cclelndahbckbenkjhflpdbgdldlbecc

  3. Open an incognito window and log into youtube

  4. open https://youtube.com/robots.txt in a new tab and close the youtube tab

  5. Export cookies, then close the incognito window (so the cookies will never rotate)

  6. Pass the cookies to yt-dlp using --cookies "PATHTOCOOKIES"

Instructions for every other site:

**DO NOT login to Facebook/Instagram with yt-dlp, unless you want your account to be banned. **

Method 1: Add --username "USERNAME" --password "PASSWORD" to your command

DO NOT use this for X/Twitter, until yt-dlp/yt-dlp#12616 is fixed

*If you are trying to log in using Adobe Pass, use --ap-list-mso to find the ID for your TV Provider, then use --ap-mso PROVIDERID --ap-username "USERNAME" --ap-password "PASSWORD" *

Method 2: Log in with your browser, then use --cookies-from-browser BROWSER (this method works on MacOS and Linux, but it only works on Windows if you use Firefox)

For firefox forks, use --cookies-from-browser "firefox:ROOTDIR" where ROOTDIR is your "root directory", found in about:profiles

Method 3: Export cookies manually using https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc, then use --cookies "PATHTOCOOKIES"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment