Fix: [2.0.3] yt-dlp 쿠키 인증 추가, 문서 업데이트, CI/CD .md 스킵
All checks were successful
news-summary-bot-cicd / build_push_deploy (push) Successful in 4m40s

- yt-dlp에 쿠키 파일(/app/cookies.txt) 지원 추가 (YouTube 봇 감지 우회)
- CI/CD에 paths-ignore: **/*.md 추가하여 문서 수정 시 빌드 스킵
- 전체 문서 업데이트: 라우트 변경, 쿠키 인증 방식, n8n Expression 모드 안내
- .gitignore에 cookies.txt 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
sm4640
2026-03-24 15:45:12 +09:00
parent aaf5bd8d05
commit d4bd508618
9 changed files with 104 additions and 16 deletions

View File

@@ -25,8 +25,8 @@ docker compose up
n8n(RSS 감지) → `POST /api/news/summarize` → 자막 추출 → Claude 요약 → Discord 웹훅
- `app/main.py` — FastAPI 엔드포인트 (`/api/news/summarize`, `/api/news/health`)
- `app/transcript.py` — YouTube 자막 추출 (`youtube-transcript-api`)
- `app/main.py` — FastAPI 엔드포인트 (`/summarize`, `/health`) — Nginx가 `/api/news/` prefix를 strip
- `app/transcript.py` — YouTube 자막 추출 (`yt-dlp` + 쿠키 인증)
- `app/summarizer.py` — Claude Sonnet 4.6으로 요약 생성
- `app/discord.py` — Discord 웹훅 전송
- `app/config.py` — 환경변수 설정 (pydantic-settings)
@@ -35,6 +35,13 @@ n8n(RSS 감지) → `POST /api/news/summarize` → 자막 추출 → Claude 요
`ANTHROPIC_API_KEY`, `DISCORD_WEBHOOK_URL` 필수. `API_SECRET`은 선택(n8n → FastAPI 인증용).
## 쿠키 인증 (YouTube 봇 감지 우회)
OCI 등 클라우드 서버에서 YouTube 자막 추출 시 봇 감지 차단을 우회하기 위해 쿠키 파일이 필요.
- 브라우저 확장(Get cookies.txt LOCALLY 등)으로 YouTube 쿠키를 `cookies.txt`로 export
- 서버의 `compose.apps.yml`에서 `./news-summary-bot/cookies.txt:/app/cookies.txt:ro`로 마운트
- 쿠키 만료 시(6개월~1년) 재export 필요 → 500 에러 발생 시 쿠키 갱신 확인
## n8n 워크플로우
```