【发布时间】:2018-09-21 01:13:27
【问题描述】:
我在 nodejs 中的代码是这样的:-
var fs = require('fs');
var youtubedl = require('youtube-dl');
var video = youtubedl('http://www.youtube.com/watch?v=90AiXO1pAiA',
// Optional arguments passed to youtube-dl.
// Additional options can be given for calling `child_process.execFile()`.
);
// Will be called when the download starts.
video.on('info', function(info) {
console.log('Download started');
console.log('filename: ' + info.filename);
console.log('size: ' + info.size);
});
video.pipe(fs.createWriteStream('myvideo.mp4'));
我得到这个错误:-
生成未知
您还可以提出另一种制作 youtube 下载器的方法。
【问题讨论】:
-
this link 可以帮到你
-
@9275462 看看我的回答是否适合你。
-
替换它们需要无限时间
标签: node.js download youtube-api youtube-data-api youtube-dl