Skip to main content
Some YouTube videos require a signed-in session to access. NoteWise supports these through a cookie file — a standard Netscape-format .txt file exported from your browser. You need to supply a cookie file when the video is:
Access typeWhat it means
PrivateThe video is only visible to the owner or specific users
Members-onlyRequires a paid channel membership to watch
Age-restrictedRequires a signed-in account to confirm age
Login-requiredYouTube requires sign-in before the content can be viewed
If you attempt to process one of these videos without a cookie file, NoteWise will stop with a VideoUnavailableError and print the specific reason.

Exporting cookies from your browser

NoteWise accepts the standard Netscape cookie format, which every major browser can export via an extension.
1

Install a cookie export extension

Install a browser extension that can export cookies in Netscape/Mozilla format. Popular options:
2

Sign in to YouTube

Open your browser and sign in to the YouTube account that has access to the video you want to process.
3

Export the cookies

Navigate to youtube.com in your browser. Activate the cookie export extension and export the cookies for the current site. Save the file as cookies.txt (or any name you prefer).
4

Verify the file format

The exported file should start with a header line like:
# Netscape HTTP Cookie File
# https://curl.haxx.se/rfc/cookie_spec.html
Each subsequent line is a tab-separated cookie record. If the file looks like this, it is in the correct format.
Pass the path to your cookie file with --cookie-file (or --cookies):
notewise process "https://youtube.com/watch?v=VIDEO_ID" --cookie-file ~/cookies.txt
notewise process "https://youtube.com/playlist?list=PLAYLIST_ID" --cookies /path/to/cookies.txt
The cookie file is used for all YouTube requests in that run — transcript fetching, metadata retrieval, and playlist expansion.

Persistent configuration

To avoid passing --cookie-file on every command, set the path in ~/.notewise/config.env:
YOUTUBE_COOKIE_FILE=/home/user/cookies.txt
The CLI flag always takes precedence over the config file value.

Error messages for restricted videos

When access is denied, NoteWise raises a VideoUnavailableError with a reason field. The messages you will see in the terminal are:
This YouTube content is private. Retry with --cookie-file / --cookies from an
account that can view it, or make it unlisted or public.
The video owner has set the video to private. You need a cookie file from an account explicitly granted access.
This YouTube content is members-only. Retry with --cookie-file / --cookies from
an account that has access, or use a public or unlisted alternative.
The video is behind a channel membership paywall. You need a cookie file from an account with an active membership.
This YouTube content is age-restricted. Retry with --cookie-file / --cookies
from an eligible account, or use a public or unrestricted alternative.
The video requires age verification. You need a cookie file from a signed-in account that has confirmed its age on YouTube.
This YouTube content requires sign-in. Retry with --cookie-file / --cookies,
or use a public or unlisted video.
YouTube is requiring authentication before returning this content. Provide a cookie file from any signed-in account.

Security considerations

Your cookie file grants access to your YouTube account. Treat it like a password.
  • Never commit a cookie file to version control.
  • Add cookies.txt (or your cookie filename) to .gitignore.
  • Do not share the file or store it in a world-readable location.
  • Cookies expire. Re-export from your browser if you start seeing authentication errors after the file worked previously.
When running in Docker, mount the cookie file as a read-only bind mount rather than copying it into an image layer:
docker run --rm \
  -e GEMINI_API_KEY="your_key" \
  -v "$(pwd)/output:/output" \
  -v "$(pwd)/cookies.txt:/cookies.txt:ro" \
  ghcr.io/whoisjayd/notewise:latest \
  process "https://youtube.com/watch?v=VIDEO_ID" --cookie-file /cookies.txt

Build docs developers (and LLMs) love