youtube-dl.js

1.1.1 • Public • Published

youtube-dl.js

Build Status npm version

Installation

Requirements

FFmpeg has to be installed to PATH

To install youtube-dl.js run npm install youtube-dl.js --save

To update the youtube-dl binary, run npm run updateytdl or run the setup script (node setup.js)

Usage

const ytdl = require("youtube-dl.js");
 
let url = "https://youtu.be/q5weS3aY-Qc",
    filename = `${new Date().getTime()}.%(ext)s`,
    args = ["-o", filename, "-x", "--audio-format=mp3", "--restrict-filenames", "--external-downloader=ffmpeg", "--audio-quality=96k"];
 
ytdl(url, args)
  .then(data => {
    console.log(data);
  })
  .catch(err => {
    console.error(err);
  });

Warning

If it works, it ain't stupid.

I'm a noob. Don't judge me. Pullrequests are very welcome!

Readme

Keywords

Package Sidebar

Install

npm i youtube-dl.js

Weekly Downloads

2

Version

1.1.1

License

ISC

Unpacked Size

6.07 kB

Total Files

7

Last publish

Collaborators

  • delivator