Rthur2003 commited on
Commit
c4db5be
·
1 Parent(s): e57b8bb

docs: update README and .env.example with optional yt-dlp cookie authentication details

Browse files
Files changed (2) hide show
  1. .env.example +6 -0
  2. README.md +4 -0
.env.example CHANGED
@@ -24,6 +24,12 @@ YOUTUBE_OAUTH_CLIENT_ID=your-youtube-oauth-client-id
24
  YOUTUBE_OAUTH_CLIENT_SECRET=your-youtube-oauth-client-secret
25
  YOUTUBE_OAUTH_REDIRECT_URI=https://your-domain.com/ai-music-detection
26
 
 
 
 
 
 
 
27
  # =============================================
28
  # Crown Commend (YouTube AI Comment Generator)
29
  # =============================================
 
24
  YOUTUBE_OAUTH_CLIENT_SECRET=your-youtube-oauth-client-secret
25
  YOUTUBE_OAUTH_REDIRECT_URI=https://your-domain.com/ai-music-detection
26
 
27
+ # Optional: authenticate yt-dlp when YouTube blocks guest downloads
28
+ # Use one of the methods below.
29
+ # YOUTUBE_COOKIES_FROM_BROWSER=edge
30
+ # YOUTUBE_COOKIES_FILE=/absolute/path/to/cookies.txt
31
+ # YOUTUBE_COOKIES_BASE64=base64-encoded-cookies-txt
32
+
33
  # =============================================
34
  # Crown Commend (YouTube AI Comment Generator)
35
  # =============================================
README.md CHANGED
@@ -141,6 +141,9 @@ Response:
141
  | `CROWNCODE_API_TIMEOUT_SEC` | `30` | External service timeout |
142
  | `SES_ANALIZI_THRESHOLD` | `0.5` | Authenticity score threshold |
143
  | `LOG_LEVEL` | `INFO` | Logging level |
 
 
 
144
  | `COMMEND_GEMINI_API_KEY` | - | Gemini API key for Crown Commend (also used as YouTube API Key fallback) |
145
  | `COMMEND_YOUTUBE_API_KEY` | - | YouTube Data API key for read operations (optional if Gemini key is set) |
146
  | `COMMEND_TOKEN_JSON` | - | YouTube OAuth token JSON for posting comments (optional) |
@@ -187,6 +190,7 @@ docker run -p 7860:7860 crowncode-backend
187
  ## Notes
188
 
189
  - `yt-dlp` requires network access and works best with `ffmpeg` installed
 
190
  - When external services are not configured, returns preview decision
191
  - Hugging Face free tier has 16GB RAM and 2 vCPU
192
  - Build may take 5-10 minutes due to PyTorch installation
 
141
  | `CROWNCODE_API_TIMEOUT_SEC` | `30` | External service timeout |
142
  | `SES_ANALIZI_THRESHOLD` | `0.5` | Authenticity score threshold |
143
  | `LOG_LEVEL` | `INFO` | Logging level |
144
+ | `YOUTUBE_COOKIES_FROM_BROWSER` | - | Optional `yt-dlp` browser cookie source, e.g. `edge` or `chrome:Default` |
145
+ | `YOUTUBE_COOKIES_FILE` | - | Optional Netscape `cookies.txt` path for YouTube-authenticated downloads |
146
+ | `YOUTUBE_COOKIES_BASE64` | - | Optional base64-encoded `cookies.txt` content for secret managers |
147
  | `COMMEND_GEMINI_API_KEY` | - | Gemini API key for Crown Commend (also used as YouTube API Key fallback) |
148
  | `COMMEND_YOUTUBE_API_KEY` | - | YouTube Data API key for read operations (optional if Gemini key is set) |
149
  | `COMMEND_TOKEN_JSON` | - | YouTube OAuth token JSON for posting comments (optional) |
 
190
  ## Notes
191
 
192
  - `yt-dlp` requires network access and works best with `ffmpeg` installed
193
+ - If YouTube returns a bot-check/sign-in challenge, configure `YOUTUBE_COOKIES_FROM_BROWSER=edge` or pass a `cookies.txt` file via `YOUTUBE_COOKIES_FILE`
194
  - When external services are not configured, returns preview decision
195
  - Hugging Face free tier has 16GB RAM and 2 vCPU
196
  - Build may take 5-10 minutes due to PyTorch installation