Skip to content

Instantly share code, notes, and snippets.

@gamer191
Last active October 9, 2025 06:42
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"

Method 4: If the video is password protected but doesn't require an account, add --video-password PASSWORD to your command

@trannhathuy01234-blip
Copy link

trannhathuy01234-blip commented Aug 13, 2025

Regarding the method 3, can you be more specific about "PATHTOCOOKIES"? I tried -cookies C:\ABC\cookies but It didn't work

@gamer191
Copy link
Author

@trannhathuy01234-blip why did you remove the quotes and one of the dashes? It should be --cookies "C:\ABC\cookies"

@trannhathuy01234-blip
Copy link

Sorry, it was a typo. However, it still doesn't work even if i include the quotes and the dash. But it worked fine with the method 2, thanks for your help!

@devSatym
Copy link

bro i think yt has blocked me , rn Im unable to download any video , it is giving me same error(im using firefox )

C:\dlp>yt-dlp --cookies cookies.txt https://www.youtube.com/watch?v=crlTfvrB6Gg

[youtube] Extracting URL: https://www.youtube.com/watch?v=crlTfvrB6Gg

[youtube] crlTfvrB6Gg: Downloading webpage

[youtube] crlTfvrB6Gg: Downloading tv client config

[youtube] crlTfvrB6Gg: Downloading tv player API JSON

[youtube] crlTfvrB6Gg: Downloading ios player API JSON

ERROR: [youtube] crlTfvrB6Gg: The following content is not available on this app.

C:\dlp>yt-dlp --cookies-from-browser firefox --extractor-args "youtube:player_client=web" https://www.youtube.com/watch?v=crlTfvrB6Gg

Extracting cookies from firefox

Extracted 342 cookies from firefox

[youtube] Extracting URL: https://www.youtube.com/watch?v=crlTfvrB6Gg

[youtube] crlTfvrB6Gg: Downloading webpage

ERROR: [youtube] crlTfvrB6Gg: The following content is not available on this app.. Watch on the latest version of YouTube.

C:\dlp>yt-dlp --cookies-from-browser firefox --extractor-args "youtube:player_client=web,player_version=19.08" https://www.youtube.com/watch?v=crlTfvrB6Gg

Extracting cookies from firefox

Extracted 342 cookies from firefox

[youtube] Extracting URL: https://www.youtube.com/watch?v=crlTfvrB6Gg

[youtube] crlTfvrB6Gg: Downloading webpage

WARNING: [youtube] Skipping unsupported client "player_version=19.08"

ERROR: [youtube] crlTfvrB6Gg: The following content is not available on this app.. Watch on the latest version of YouTube.

@gamer191
Copy link
Author

Is yt-dlp up to date (yt-dlp --update-to nightly)? Are you able to watch YouTube videos in Firefox? Why are you using those extractor args?

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