Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- YouTubeDl('http://www.youtube.com/watch?v=' + videoId, {
- filter: function(format) {
- return format.container === 'mp4';
- }
- })
- .pipe(fs.createWriteStream('music.mp3'))
- .on('error', function(err) {
- //Do smth. with error
- })
- .on('finish', function() {
- //do smth. on finish..
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement