dockify
This commit is contained in:
20
.serena/memories/progress_note_youtube_fix.md
Normal file
20
.serena/memories/progress_note_youtube_fix.md
Normal file
@@ -0,0 +1,20 @@
|
||||
# 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.
|
||||
Reference in New Issue
Block a user