const YouTubeMp3Downloader = require('youtube-mp3-downloader');
The MP3 file should be downloaded to the ./downloads directory. youtube-mp3-downloader npm
// Configure downloader const YD = new YoutubeMp3Downloader( outputPath: DOWNLOAD_DIR, youtubeVideoQuality: "highest", queueParallelism: 1, progressTimeout: 1000 ); progressTimeout: 1000 )
Discussing youtube-mp3-downloader requires addressing the ToS (Terms of Service) violation. youtube-mp3-downloader npm