20 lines
863 B
Markdown
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. |