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):
-
Log into YouTube in your browser
-
Add
--cookies-from-browser BROWSERto your command, replacing BROWSER with the name of your browser (egsafari)
-
Log into YouTube in your browser
-
visit about:profiles
-
copy the "Root Directory"
-
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")
-
Install https://chromewebstore.google.com/detail/get-cookiestxt-locally/cclelndahbckbenkjhflpdbgdldlbecc
-
Enable "Allow in incognito" in chrome://extensions/?id=cclelndahbckbenkjhflpdbgdldlbecc
-
Open an incognito window and log into youtube
-
open https://youtube.com/robots.txt in a new tab and close the youtube tab
-
Export cookies, then close the incognito window (so the cookies will never rotate)
-
Pass the cookies to yt-dlp using
--cookies "PATHTOCOOKIES"
DO NOT login to Facebook/Instagram with yt-dlp, unless you want your account to be banned
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
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.