feat: replace yt-dlp cookies with YouTube Data API v3 OAuth

- Add auth.py: OAuth credential manager with auto-refresh
- Rewrite fetcher.py: use googleapiclient subscriptions/search
- Add google-auth, google-api-python-client dependencies
- Update docker-compose for config volume mount
- Add .gitignore for secrets (client_secret.json, token.pickle)
- Live test: 198 videos ingested from 229 channels
This commit is contained in:
Gan, Jimmy
2026-06-24 00:14:16 +08:00
parent dba070531e
commit a0ffa41c9e
7 changed files with 658 additions and 67 deletions
+4 -2
View File
@@ -7,12 +7,14 @@ services:
dockerfile: Dockerfile
container_name: t-youtube
restart: unless-stopped
ports:
- "8000:8000"
network_mode: host
environment:
- OPENAI_API_KEY=${OPENAI_API_KEY:-sk-Kq5JbgmnEEkdzTqNAQ6bV6nztQ0ngeHTHF9Vg8nUglQvrOlx}
- ANTHROPIC_API_KEY=${ANTHROPIC_API_KEY}
- ANTHROPIC_BASE_URL=https://www.bytecatcode.org
- HTTP_PROXY=http://100.70.115.1:8118
- HTTPS_PROXY=http://100.70.115.1:8118
- NO_PROXY=localhost,127.0.0.1,100.0.0.0/8,192.168.0.0/16
volumes:
- ./data:/app/data
- ./config:/app/config