🐞 fix: V1.6.7 修复y2b解析pr后细节问题

This commit is contained in:
zhiyu1998 2024-04-21 21:37:18 +08:00
parent 72121208ae
commit 301d4c657d

View File

@ -1147,7 +1147,7 @@ export class tools extends plugin {
* @param e
* @returns {Promise<void>}
*/
async dy2b(path,url) {
async dy2b(path, url, isOversea) {
return new Promise((resolve, reject) => {
const command = `yt-dlp ${ isOversea ? "" : `--proxy ${ this.myProxy }` } -P ${ path } -o "temp.%(ext)s" -f 'best[height<=720][ext=mp4]' --merge-output-format "mp4" ${ url }`;
exec(command, (error, stdout) => {
@ -1177,7 +1177,7 @@ export class tools extends plugin {
await checkAndRemoveFile(path + "/temp.mp4")
const title = execSync(`yt-dlp --get-title ${ url } ${ isOversea ? "" : `--proxy ${ this.myProxy }` }`)
e.reply(`识别:油管,视频下载中请耐心等待 \n${ title }`);
await this.dy2b(path,url)
await this.dy2b(path, url, isOversea);
this.sendVideoToUpload(e, `${ path }/temp.mp4`, videoSizeLimit)
} catch (error) {
console.error(error);