A Node.js package to download songs.
You can install this package using npm:
npm install song-downloader
import { downloadSongs } from 'song-downloader';
const DEFAULT_API_KEY = 'YOUR_YOUTUBE_API_KEY';
const songNames = ['perfect', 'let her go'];
downloadSongs(DEFAULT_API_KEY, songNames)
.then(() => console.log('Downloaded successfully'))
.catch((err) => console.error('Error:', err));
import { downloadSongs } from 'song-downloader';
const songNames = ['perfect', 'let her go'];
downloadSongs(undefined, songNames)
.then(() => console.log('Downloaded successfully'))
.catch((err) => console.error('Error:', err));
downloadSongs(api_key: string, songNames: string[]) api_key (string): Your YouTube Data API v3 key. songNames (string[]): An array of song names you want to download.
The songs will be downloaded in the "C drive" of your computer under the folder named "downloads".
There is a limit to the number of songs that can be downloaded because of the Youtube Data API v3.
This project is licensed under the MIT License.