mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-10-14 16:19:18 +00:00
🐞 fix: V1.6.7 修复y2b解析pr后细节问题
This commit is contained in:
parent
72121208ae
commit
301d4c657d
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user