Merge pull request #1 from imoasislee/dl-proxy

设置代理
This commit is contained in:
OasisLee
2021-04-09 10:59:12 +08:00
committed by GitHub
+4 -1
View File
@@ -4,6 +4,9 @@ const { download } = require('./utils');
module.exports = (options, callback) => {
let op = `-k ${options.playlist !== '0' ? '--playlist' : ''}`;
if (options.proxy) {
op += ` -x ${options.proxy}`;
}
if (options.name) {
op += ` -O ${options.name}`;
}
@@ -19,4 +22,4 @@ module.exports = (options, callback) => {
}
download(`you-get ${op} '${options.url}' >> logs/you-get.log`, callback);
}
}