🔧 refactor: 优化 油管解析视频下载策略

This commit is contained in:
秋刀鱼 2024-09-27 14:03:44 +08:00
parent f3b3f83da3
commit 6dcd018511

View File

@ -34,7 +34,7 @@ export async function ytDlpHelper(path, url, isOversea, proxy, merge = false) {
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
const mergeOption = merge ? '--merge-output-format "mp4"' : ''; const mergeOption = merge ? '--merge-output-format "mp4"' : '';
const command = `yt-dlp ${constructProxyParam(isOversea, proxy)} -P ${path} -o "temp.%(ext)s" ${mergeOption} ${url}`; const command = `yt-dlp -f "bv[height<=720][ext=mp4]+ba[ext=m4a]" ${constructProxyParam(isOversea, proxy)} -P ${path} -o "temp.%(ext)s" ${url}`;
exec(command, (error, stdout) => { exec(command, (error, stdout) => {
if (error) { if (error) {