Why your yt-dlp cookies stop working after a day
The fix everyone gives for yt-dlp's "Sign in to confirm you're not a bot" is to pass your YouTube cookies. It works. Then a day or two later the same error is back, with the same cookies.txt, and nothing in your command changed. I hit this enough times that it's worth writing down why it happens and what keeps the cookies alive longer. YouTube rotates the session you exported from If you export…
The issue with yt-dlp's "Sign in to confirm you're not a bot" error is caused by YouTube rotating session cookies frequently. Exporting cookies from an active browser window results in a stale copy of a session that has moved on, causing the error to reappear after a day or two. To resolve this, open a private or incognito window and sign in to YouTube on that tab, then export the cookies from that session.
Use a separate Google account for this purpose. Close the private window after exporting the cookies. Do not sign out of the account used in the exported session. When running yt-dlp, use a writable file for the cookies to ensure it picks up any updates made by the site during the run. This approach can give you weeks of reliable use instead of just a day.
Rewritten by urgent.news; may contain errors — check the original.