Skip to content

Add optional cookies.txt support for authenticated downloads#25

Open
williamtwomey wants to merge 1 commit intoaverygan:mainfrom
williamtwomey:add-cookies-auth
Open

Add optional cookies.txt support for authenticated downloads#25
williamtwomey wants to merge 1 commit intoaverygan:mainfrom
williamtwomey:add-cookies-auth

Conversation

@williamtwomey
Copy link
Copy Markdown

@williamtwomey williamtwomey commented Apr 10, 2026

Summary

Some sites (X/Twitter and Youtube) require authentication to serve certain content. Without cookies, yt-dlp just returns "No video could be found in this tweet" and there's no way around it.

This adds optional cookies.txt support:

  • If a cookies.txt file exists in the project root, yt-dlp will use it for both info fetching and downloads
  • If it doesn't exist, everything works exactly as before - no behavior change
  • docker-compose.yml bind-mounts the file into the container so it's available at runtime
  • cookies.txt is gitignored since it contains session data

Usage

  1. Export cookies from your browser using something like "Get cookies.txt LOCALLY"
  2. Save as cookies.txt in the project root
  3. Restart the container

Works for any site where yt-dlp supports cookie-based auth, not just X.

Sites like X/Twitter require login to access certain content — this
lets yt-dlp use a cookies.txt file (Netscape format) when one is
present, so those downloads just work.

- app.py checks for cookies.txt and passes --cookies to yt-dlp
- docker-compose.yml bind-mounts the file into the container
- cookies.txt added to .gitignore since it contains session data
DeBondor added a commit to DeBondor/reclip that referenced this pull request Apr 11, 2026
…an#14 — cookies, playlist, AAC, GIF, batch download

- averygan#25: cookies.txt support (COOKIES_FILE auto-detected, passed to all yt-dlp calls)
- averygan#28: YouTube playlist expansion via /api/playlist endpoint (flat-playlist -J)
- averygan#29: Force AAC audio codec (-S acodec:aac) for all video/audio downloads
- averygan#20: GIF export via ffmpeg 2-pass palettegen/paletteuse, 15fps, max 480px width
- averygan#14: Batch download via /api/batch/download + /api/batch/status, ThreadPoolExecutor(3), parallel Download All
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant