youtube-dl-installer
v1.0.1
Published
Platform independent binary installer of youtube-dl for node projects
Downloads
5
Readme
youtube-dl-installer
Platform independent binary installer of youtube-dl for node projects
Install
$ npm install youtube-dl-installer --save
Usage
'use strict'
const { promisify } = require('util')
const execFile = promisify(require('child_process').execFile)
const getInfo = async url => {
const args = [ '--dump-json', '-f', 'best', url ]
const {stdout, stderr} = await execFile(youtubeDlPath, args)
return stderr === '' ? JSON.parse(stdout) : {}
}
;(async () => {
const payload = await getInfo('https://www.youtube.com/watch?v=hwMkbaS_M_c')
console.log(payload)
})()
License
youtube-dl-installer © Kiko Beats, released under the MIT License. Authored and maintained by Kiko Beats with help from contributors.
kikobeats.com · GitHub Kiko Beats · Twitter @Kikobeats