Files
quixotic/.serena/memories/progress_note_youtube_fix.md
Andrey Kondratev b8e2bf1090 dockify
2025-08-28 16:37:59 +05:00

20 lines
863 B
Markdown

# YouTube Bot Detection Fix - Progress Note
## Problem Identified
YouTube was blocking requests with "Sign in to confirm you're not a bot" error when trying to download audio streams.
## Solutions Implemented
1. **Installed yt-dlp system dependency** - More reliable YouTube downloader that better handles bot detection
2. **Updated YouTubeService** - Added fallback mechanism:
- First tries play-dl (existing method)
- If that fails, falls back to yt-dlp system command
- yt-dlp gets direct audio URL then creates stream via axios
## Code Changes
- Added `spawn` import for child process execution
- Modified `getAudioStream()` to try both methods
- Added new `getAudioStreamWithYtDlp()` method as fallback
## Next Steps
User should restart server to test the fix. If still issues, they can set up YouTube cookies as documented in YOUTUBE_SETUP.md.