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 BROWSER
to 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