youtube-dl-webpack
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

youtube-dl downloader plugin for webpack

npm MIT License

A simple Node.js youtube-dl wrapper for webpack
This repository is a port version of youtube-dl-exec for webpack

Why

  • Executes any command in an efficient way.
  • Use youtube-dl in webpack

Installation

npm install --save youtube-dl-webpack
npm install --save-dev youtube-dl-downloader-webpack-plugin

Usage

In webpack build config

const { YoutudeDlDownloaderWebpackPlugin } = require('youtube-dl-downloader-webpack-plugin')

module.exports = {
  ...
  plugins: [
    new YoutudeDlDownloaderWebpackPlugin({
      to: 'lib',    // A directory to save file
      from: 'auto', // A site to download file (auto, github or website)
    })
    ...
  ]
}

see youtube-dl-downloader-webpack-plugin to know detail.

Use youtubedl in your codes

const youtubedl = require('youtube-dl-webpack')

youtubedl('https://example.com', {
  dumpSingleJson: true,
  noWarnings: true,
  noCallHome: true,
  noCheckCertificate: true,
  preferFreeFormats: true,
  youtubeSkipDashManifest: true,
  referer: 'https://example.com',
}).then(output => console.log(output))

It's equivalent to:

$ youtube-dl https://example.com --dump-single-json --no-warnings --no-call-home --no-check-certificate --prefer-free-formats --youtube-skip-dash-manifest --referer=https://example.com

Contribution

We welcome your contribution in any way.

Package Sidebar

Install

npm i youtube-dl-webpack

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

11.7 kB

Total Files

6

Last publish

Collaborators

  • 2jun0