mirror of
https://github.com/Jerryplusy/rc-plugin.git
synced 2025-12-05 18:01:56 +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
|
* @param e
|
||||||
* @returns {Promise<void>}
|
* @returns {Promise<void>}
|
||||||
*/
|
*/
|
||||||
async dy2b(path,url) {
|
async dy2b(path, url, isOversea) {
|
||||||
return new Promise((resolve, reject) => {
|
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 }`;
|
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) => {
|
exec(command, (error, stdout) => {
|
||||||
@ -1177,7 +1177,7 @@ export class tools extends plugin {
|
|||||||
await checkAndRemoveFile(path + "/temp.mp4")
|
await checkAndRemoveFile(path + "/temp.mp4")
|
||||||
const title = execSync(`yt-dlp --get-title ${ url } ${ isOversea ? "" : `--proxy ${ this.myProxy }` }`)
|
const title = execSync(`yt-dlp --get-title ${ url } ${ isOversea ? "" : `--proxy ${ this.myProxy }` }`)
|
||||||
e.reply(`识别:油管,视频下载中请耐心等待 \n${ title }`);
|
e.reply(`识别:油管,视频下载中请耐心等待 \n${ title }`);
|
||||||
await this.dy2b(path,url)
|
await this.dy2b(path, url, isOversea);
|
||||||
this.sendVideoToUpload(e, `${ path }/temp.mp4`, videoSizeLimit)
|
this.sendVideoToUpload(e, `${ path }/temp.mp4`, videoSizeLimit)
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error(error);
|
console.error(error);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user