song-downloader

1.1.0 • Public • Published

song-downloader

A Node.js package to download songs.

Installation

You can install this package using npm:

npm install song-downloader

Usage (with API key)

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));

Usage (without API key)

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));

API

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.

Where will the songs be downloaded

The songs will be downloaded in the "C drive" of your computer under the folder named "downloads".

Download Limit

There is a limit to the number of songs that can be downloaded because of the Youtube Data API v3.

License

This project is licensed under the MIT License.

Package Sidebar

Install

npm i song-downloader

Weekly Downloads

0

Version

1.1.0

License

MIT

Unpacked Size

7.39 kB

Total Files

5

Last publish

Collaborators

  • hrajput0322