Skip to content
This repository has been archived by the owner on Dec 3, 2023. It is now read-only.

Commit

Permalink
Merge pull request #25 from przemyslawpluta/master
Browse files Browse the repository at this point in the history
fix for win py2.x / py3.x
  • Loading branch information
Roly Fentanes committed Apr 8, 2014
2 parents b27d373 + 472a8db commit 7221b8c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/youtube-dl.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,16 +97,16 @@ function call(video, args, options, callback) {
args.push('http://www.youtube.com/watch?v=' + id);
}

var opt = [file, args, ''];
var opt = [file, args];

if (isWin) { opt = ['python', [file].concat(args), '\r']; }
if (isWin) { opt = ['python', [file].concat(args)]; }

// Call youtube-dl.
execFile(opt[0], opt[1], function(err, stdout, stderr) {
if (err) return callback(err);
if (stderr) return callback(new Error(stderr.slice(7)));

var data = stdout.trim().split(opt[2] + '\n');
var data = stdout.trim().split(/\r?\n/);
callback(null, data);
});

Expand Down

0 comments on commit 7221b8c

Please sign in to comment.