# music-dwnldr

> Module to download music.

Latest version **1.1.0** (published 2022-12-16) · MIT license · 0 weekly downloads

## Install

```sh
npm install music-dwnldr
pnpm add music-dwnldr
yarn add music-dwnldr
bun add music-dwnldr
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2022-12-16 |
| First published | 2022-12-13 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 8 |
| Unpacked size | 14 KB |
| Known vulnerabilities | 0 (+1 in 1 direct dependencies) |
| Install scripts | no |
| Author | SohamBorate |
| Maintainers | boru |
| Keywords | youtube, spotify, music |

## Links

- npm: https://www.npmjs.com/package/music-dwnldr
- Repository: https://github.com/SohamBorate/music-dwnldr
- Homepage: https://github.com/SohamBorate/music-dwnldr#readme
- Issues: https://github.com/SohamBorate/music-dwnldr/issues
- npm.io page: https://npm.io/package/music-dwnldr

## Dependencies (8)

- [fs](https://npm.io/package/fs.md) ^0.0.1-security
- [https](https://npm.io/package/https.md) ^1.0.0
- [stream](https://npm.io/package/stream.md) ^0.0.2
- [ytdl-core](https://npm.io/package/ytdl-core.md) ^4.11.2
- [youtube-sr](https://npm.io/package/youtube-sr.md) ^4.3.0
- [fluent-ffmpeg](https://npm.io/package/fluent-ffmpeg.md) ^2.1.2
- [browser-id3-writer](https://npm.io/package/browser-id3-writer.md) ^4.4.0
- [spotify-web-api-node](https://npm.io/package/spotify-web-api-node.md) ^5.0.2

## Recent versions

- 1.1.0 (latest) — 2022-12-16
- 1.0.2 — 2022-12-15
- 1.0.1 — 2022-12-15
- 1.0.0 — 2022-12-13

## README

# music-dwnldr
A module to download music.

## Usage

Go to [Spotify Developer Dashboard](https://developer.spotify.com/dashboard/applications)
and create an app.

Copy the `Client ID` and the `Client Secret`.

```js
const MusicDownloader = require("music-dwnldr");

let credentials = require({
    "clientId": "<Client ID>",
    "clientSecret": "<Client Secret>"
});
let downloader = new MusicDownloader(credentials, __dirname);

downloader.then((object) => {
    downloader = object;
    let download = downloader.downloadFromUrl("https://open.spotify.com/track/08mG3Y1vljYA6bvDt4Wqkj?si=5e9d730f633447c4")
    .then((data) => {
       console.log(data);
    }, (err) => {
        console.error(err);
    });
}, (err) => console.error(err));
```

## Downloading using search query

```js
const MusicDownloader = require("music-dwnldr");

let credentials = require({
    "clientId": "<Client ID>",
    "clientSecret": "<Client Secret>"
});
let downloader = new MusicDownloader(credentials, __dirname);

downloader.then((object) => {
    downloader = object;
    let download = downloader.downloadFromSearch("Teenagers My Chemical Romance")
    .then((data) => {
       console.log(data);
    }, (err) => {
        console.error(err);
    });
}, (err) => console.error(err));
```

---
_Source: https://npm.io/package/music-dwnldr · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
