From d134e4d6be6137a0a1ea209ea96fceaa627be1b3 Mon Sep 17 00:00:00 2001 From: Abu Ottermann Date: Tue, 20 Feb 2024 01:13:41 +0100 Subject: [PATCH 1/9] fixing imgur --- src/inc/trigger/parser.mjs | 39 ++++++++++++++++++++++++-------------- 1 file changed, 25 insertions(+), 14 deletions(-) diff --git a/src/inc/trigger/parser.mjs b/src/inc/trigger/parser.mjs index b940eff..d7133ef 100644 --- a/src/inc/trigger/parser.mjs +++ b/src/inc/trigger/parser.mjs @@ -11,7 +11,7 @@ import path from "path"; const regex = { all: /https?:\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?/gi, yt: /(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch\/?\?(?:\S*?&?v\=))|youtu\.be\/)([a-zA-Z0-9_-]{6,11})/gi, - imgur: /^https?:\/\/(\w+\.)?imgur.com\/(\w*\d\w*)+(\.[a-zA-Z]{3,4})?/gi, + imgur: /(?:https?:)?\/\/(\w+\.)?imgur\.com\/(\S*)(\.[a-zA-Z]{3})/gm, instagram: /(?:https?:\/\/www\.)?instagram\.com\S*?\/(?:p|reel)\/(\w{11})\/?/im }; const mediagroupids = new Set(); @@ -52,10 +52,10 @@ export default async bot => { links.forEach(async link => { if(regex.imgur.test(link)) - return await e.reply(`fuck imgur... seriously`); + await e.reply(`imgur schmimigur`); if(regex.instagram.test(link)) - return await e.reply(`fuck instagram... seriously`); + await e.reply(`insta schminsta`); // check repost (link) repost = await queue.checkrepostlink(link); @@ -69,16 +69,16 @@ export default async bot => { // read metadata let ext; - if(regex.instagram.test(link)) - // is instagram - try { - // @flummi -> is there a variable for the actual work directory so it doesn't have to be hardcoded? - const meta = JSON.parse((await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' --skip-download --dump-json "${link}"`)).stdout); - ext = meta.ext; - } catch(err) { - const tmphead = (await fetch(link, { method: "HEAD" })).headers["content-type"]; - // this can be undefined for unsupported mime types, but will be caught in the general mime check below - ext = cfg.mimes[tmphead]; + if(regex.imgur.test(link)) { + // is imgur + try { + // will die extension von der url + ext = link.split(".").slice(-1).join("."); + } catch(err) { + const tmphead = (await fetch(link, { method: "HEAD" })).headers["content-type"]; + // this can be undefined for unsupported mime types, but will be caught in the general mime check below + ext = cfg.mimes[tmphead]; + } } else { // is not instagram @@ -114,7 +114,18 @@ export default async bot => { return await e.editMessageText(msg.result.chat.id, msg.result.message_id, "instagram dl error"); return await e.reply("instagram dl error", err); } - else { + else if(regex.imgur.test(link)) { + console.log("penis123"); + try { + await queue.exec(`torsocks wget "${link}" -O "./tmp/${uuid}.${ext}"`); + source = "/home/f0ck/f0ckv2/tmp/"+uuid+"."+ext; + console.log(source); + } catch(err) { + console.log(err); + } + } + else + { try { source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.%(ext)s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim(); } catch(err) { From 050c9e66c80805894dabdb3bea6eaf17e4283aff Mon Sep 17 00:00:00 2001 From: Abu Ottermann Date: Tue, 20 Feb 2024 01:16:40 +0100 Subject: [PATCH 2/9] path? --- src/inc/trigger/parser.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inc/trigger/parser.mjs b/src/inc/trigger/parser.mjs index d7133ef..9c29b29 100644 --- a/src/inc/trigger/parser.mjs +++ b/src/inc/trigger/parser.mjs @@ -118,7 +118,7 @@ export default async bot => { console.log("penis123"); try { await queue.exec(`torsocks wget "${link}" -O "./tmp/${uuid}.${ext}"`); - source = "/home/f0ck/f0ckv2/tmp/"+uuid+"."+ext; + source = "/opt/f0ck/tmp/"+uuid+"."+ext; console.log(source); } catch(err) { console.log(err); From 00db7c6113c96902e88788983e465be745b50496 Mon Sep 17 00:00:00 2001 From: Abu Ottermann Date: Tue, 20 Feb 2024 01:26:59 +0100 Subject: [PATCH 3/9] path! --- src/inc/trigger/parser.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/inc/trigger/parser.mjs b/src/inc/trigger/parser.mjs index 9c29b29..e8709c0 100644 --- a/src/inc/trigger/parser.mjs +++ b/src/inc/trigger/parser.mjs @@ -118,7 +118,7 @@ export default async bot => { console.log("penis123"); try { await queue.exec(`torsocks wget "${link}" -O "./tmp/${uuid}.${ext}"`); - source = "/opt/f0ck/tmp/"+uuid+"."+ext; + source = "./tmp/"+uuid+"."+ext; console.log(source); } catch(err) { console.log(err); From 95902023e95cef6e9081bf5b9e3427a40b4b380a Mon Sep 17 00:00:00 2001 From: Flummi Date: Tue, 20 Feb 2024 17:46:41 +0100 Subject: [PATCH 4/9] imgur schmimgur --- src/inc/trigger/parser.mjs | 73 +++++++++++++++++++++++++++++++------- 1 file changed, 61 insertions(+), 12 deletions(-) diff --git a/src/inc/trigger/parser.mjs b/src/inc/trigger/parser.mjs index e8709c0..b7cfc81 100644 --- a/src/inc/trigger/parser.mjs +++ b/src/inc/trigger/parser.mjs @@ -11,7 +11,11 @@ import path from "path"; const regex = { all: /https?:\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?/gi, yt: /(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch\/?\?(?:\S*?&?v\=))|youtu\.be\/)([a-zA-Z0-9_-]{6,11})/gi, +<<<<<<< HEAD imgur: /(?:https?:)?\/\/(\w+\.)?imgur\.com\/(\S*)(\.[a-zA-Z]{3})/gm, +======= + imgur: /(?:https?:)?\/\/(\w+\.)?imgur\.com\/(\S*)(\.[a-zA-Z]{3,4})/gi, +>>>>>>> 2b2fe45 (imgur schmimgur) instagram: /(?:https?:\/\/www\.)?instagram\.com\S*?\/(?:p|reel)\/(\w{11})\/?/im }; const mediagroupids = new Set(); @@ -51,8 +55,13 @@ export default async bot => { console.log(`parsing ${links.length} link${links.length > 1 ? "s" : ""}...`); links.forEach(async link => { +<<<<<<< HEAD if(regex.imgur.test(link)) await e.reply(`imgur schmimigur`); +======= + //if(regex.imgur.test(link)) + // return await e.reply(`fuck imgur... seriously`); +>>>>>>> 2b2fe45 (imgur schmimgur) if(regex.instagram.test(link)) await e.reply(`insta schminsta`); @@ -69,16 +78,34 @@ export default async bot => { // read metadata let ext; +<<<<<<< HEAD if(regex.imgur.test(link)) { // is imgur try { // will die extension von der url ext = link.split(".").slice(-1).join("."); +======= + if(link.match(regex.instagram)) { + // is instagram + try { + // @flummi -> is there a variable for the actual work directory so it doesn't have to be hardcoded? + const meta = JSON.parse((await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' --skip-download --dump-json "${link}"`)).stdout); + ext = meta.ext; +>>>>>>> 2b2fe45 (imgur schmimgur) } catch(err) { const tmphead = (await fetch(link, { method: "HEAD" })).headers["content-type"]; // this can be undefined for unsupported mime types, but will be caught in the general mime check below ext = cfg.mimes[tmphead]; +<<<<<<< HEAD } +======= + } + } + else if(link.match(regex.imgur)) { + // imghure + ext = link.split('.').pop(); + await e.reply(`extension: ${ext}`); +>>>>>>> 2b2fe45 (imgur schmimgur) } else { // is not instagram @@ -100,10 +127,11 @@ export default async bot => { disable_notification: true }); - // download data + // const start = new Date(); let source; +<<<<<<< HEAD try { if(regex.instagram.test(link)) try { @@ -133,20 +161,41 @@ export default async bot => { return await e.editMessageText(msg.result.chat.id, msg.result.message_id, err); return await e.reply(err); } +======= + if(link.match(regex.instagram)) { + try { + // add --cookies on local instance if you want to avoid getting rate limited + source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.${ext}s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim(); + } catch(err) { + if(e.type == 'tg') + return await e.editMessageText(msg.result.chat.id, msg.result.message_id, "instagram dl error"); + return await e.reply("instagram dl error", err); +>>>>>>> 2b2fe45 (imgur schmimgur) } - } catch(err) { - console.log(err); } + else if(link.match(regex.imgur)) { + // imghure via torsocks + try { + await queue.exec(`torsocks wget ${link} -O ./tmp/${uuid}.${ext}`); + source = `./tmp/${uuid}.${ext}`; + } catch(err) { + console.error('err:', err); + if(e.type == 'tg') + return await e.editMessageText(msg.result.chat.id, msg.result.message_id, err); + return await e.reply(err); + } + } + else { + try { + source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.${ext}s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim(); + } catch(err) { + if(e.type == 'tg') + return await e.editMessageText(msg.result.chat.id, msg.result.message_id, err); + return await e.reply(err); + } + } + // - // this is how it was before I fucked it up :> - // try { - // source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.%(ext)s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim(); - // } catch(err) { - // if(e.type == 'tg') - // return await e.editMessageText(msg.result.chat.id, msg.result.message_id, "something went wrong lol"); - // return await e.reply("something went wrong lol"); - // } - if(!source) { if(e.type == 'tg') return await e.editMessageText(msg.result.chat.id, msg.result.message_id, "something went wrong lol"); From d0336d8cfb8478abdfd6bd3d11ddf7598257d46d Mon Sep 17 00:00:00 2001 From: Abu Ottermann Date: Tue, 20 Feb 2024 20:39:11 +0100 Subject: [PATCH 5/9] imghure --- src/inc/trigger/parser.mjs | 53 -------------------------------------- 1 file changed, 53 deletions(-) diff --git a/src/inc/trigger/parser.mjs b/src/inc/trigger/parser.mjs index b7cfc81..e427129 100644 --- a/src/inc/trigger/parser.mjs +++ b/src/inc/trigger/parser.mjs @@ -11,11 +11,7 @@ import path from "path"; const regex = { all: /https?:\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?/gi, yt: /(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch\/?\?(?:\S*?&?v\=))|youtu\.be\/)([a-zA-Z0-9_-]{6,11})/gi, -<<<<<<< HEAD - imgur: /(?:https?:)?\/\/(\w+\.)?imgur\.com\/(\S*)(\.[a-zA-Z]{3})/gm, -======= imgur: /(?:https?:)?\/\/(\w+\.)?imgur\.com\/(\S*)(\.[a-zA-Z]{3,4})/gi, ->>>>>>> 2b2fe45 (imgur schmimgur) instagram: /(?:https?:\/\/www\.)?instagram\.com\S*?\/(?:p|reel)\/(\w{11})\/?/im }; const mediagroupids = new Set(); @@ -55,13 +51,8 @@ export default async bot => { console.log(`parsing ${links.length} link${links.length > 1 ? "s" : ""}...`); links.forEach(async link => { -<<<<<<< HEAD - if(regex.imgur.test(link)) - await e.reply(`imgur schmimigur`); -======= //if(regex.imgur.test(link)) // return await e.reply(`fuck imgur... seriously`); ->>>>>>> 2b2fe45 (imgur schmimgur) if(regex.instagram.test(link)) await e.reply(`insta schminsta`); @@ -78,34 +69,22 @@ export default async bot => { // read metadata let ext; -<<<<<<< HEAD - if(regex.imgur.test(link)) { - // is imgur - try { - // will die extension von der url - ext = link.split(".").slice(-1).join("."); -======= if(link.match(regex.instagram)) { // is instagram try { // @flummi -> is there a variable for the actual work directory so it doesn't have to be hardcoded? const meta = JSON.parse((await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' --skip-download --dump-json "${link}"`)).stdout); ext = meta.ext; ->>>>>>> 2b2fe45 (imgur schmimgur) } catch(err) { const tmphead = (await fetch(link, { method: "HEAD" })).headers["content-type"]; // this can be undefined for unsupported mime types, but will be caught in the general mime check below ext = cfg.mimes[tmphead]; -<<<<<<< HEAD - } -======= } } else if(link.match(regex.imgur)) { // imghure ext = link.split('.').pop(); await e.reply(`extension: ${ext}`); ->>>>>>> 2b2fe45 (imgur schmimgur) } else { // is not instagram @@ -131,37 +110,6 @@ export default async bot => { const start = new Date(); let source; -<<<<<<< HEAD - try { - if(regex.instagram.test(link)) - try { - // add --cookies on local instance if you want to avoid getting rate limited - source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.%(ext)s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim(); - } catch(err) { - if(e.type == 'tg') - return await e.editMessageText(msg.result.chat.id, msg.result.message_id, "instagram dl error"); - return await e.reply("instagram dl error", err); - } - else if(regex.imgur.test(link)) { - console.log("penis123"); - try { - await queue.exec(`torsocks wget "${link}" -O "./tmp/${uuid}.${ext}"`); - source = "./tmp/"+uuid+"."+ext; - console.log(source); - } catch(err) { - console.log(err); - } - } - else - { - try { - source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.%(ext)s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim(); - } catch(err) { - if(e.type == 'tg') - return await e.editMessageText(msg.result.chat.id, msg.result.message_id, err); - return await e.reply(err); - } -======= if(link.match(regex.instagram)) { try { // add --cookies on local instance if you want to avoid getting rate limited @@ -170,7 +118,6 @@ export default async bot => { if(e.type == 'tg') return await e.editMessageText(msg.result.chat.id, msg.result.message_id, "instagram dl error"); return await e.reply("instagram dl error", err); ->>>>>>> 2b2fe45 (imgur schmimgur) } } else if(link.match(regex.imgur)) { From 705e46f838582e5cf9c9331011f150165c0dc9bd Mon Sep 17 00:00:00 2001 From: Abu Ottermann Date: Tue, 20 Feb 2024 20:51:29 +0100 Subject: [PATCH 6/9] debugmeldung entfernen --- src/inc/trigger/parser.mjs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/inc/trigger/parser.mjs b/src/inc/trigger/parser.mjs index e427129..19cb785 100644 --- a/src/inc/trigger/parser.mjs +++ b/src/inc/trigger/parser.mjs @@ -84,7 +84,6 @@ export default async bot => { else if(link.match(regex.imgur)) { // imghure ext = link.split('.').pop(); - await e.reply(`extension: ${ext}`); } else { // is not instagram From 77d041bb192dbe439f82f4c535eec9e482e6388c Mon Sep 17 00:00:00 2001 From: Abu Ottermann Date: Tue, 20 Feb 2024 21:06:47 +0100 Subject: [PATCH 7/9] blah --- src/inc/trigger/parser.mjs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/inc/trigger/parser.mjs b/src/inc/trigger/parser.mjs index 19cb785..d562b1d 100644 --- a/src/inc/trigger/parser.mjs +++ b/src/inc/trigger/parser.mjs @@ -11,7 +11,7 @@ import path from "path"; const regex = { all: /https?:\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?/gi, yt: /(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch\/?\?(?:\S*?&?v\=))|youtu\.be\/)([a-zA-Z0-9_-]{6,11})/gi, - imgur: /(?:https?:)?\/\/(\w+\.)?imgur\.com\/(\S*)(\.[a-zA-Z]{3,4})/gi, + imgur: /(?:https?:)?\/\/(\w+\.)?imgur\.com\/(\S*)(\.[a-zA-Z].{3,4})/i, instagram: /(?:https?:\/\/www\.)?instagram\.com\S*?\/(?:p|reel)\/(\w{11})\/?/im }; const mediagroupids = new Set(); @@ -128,16 +128,17 @@ export default async bot => { console.error('err:', err); if(e.type == 'tg') return await e.editMessageText(msg.result.chat.id, msg.result.message_id, err); - return await e.reply(err); + return await e.reply('something went wrong lol'); } } else { try { source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.${ext}s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim(); } catch(err) { + console.error('err:', err); if(e.type == 'tg') return await e.editMessageText(msg.result.chat.id, msg.result.message_id, err); - return await e.reply(err); + return await e.reply('something went wrong lol'); } } // From 0c6e806525a93cacfe6e80fd2082a6b83343399b Mon Sep 17 00:00:00 2001 From: Flummi Date: Wed, 21 Feb 2024 12:05:50 +0100 Subject: [PATCH 8/9] fix imgur regex & s lol --- src/inc/trigger/parser.mjs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/inc/trigger/parser.mjs b/src/inc/trigger/parser.mjs index d562b1d..971c0eb 100644 --- a/src/inc/trigger/parser.mjs +++ b/src/inc/trigger/parser.mjs @@ -11,7 +11,7 @@ import path from "path"; const regex = { all: /https?:\/\/([\w_-]+(?:(?:\.[\w_-]+)+))([\w.,@?^=%&:/~+#-]*[\w@?^=%&/~+#-])?/gi, yt: /(?:youtube\.com\/\S*(?:(?:\/e(?:mbed))?\/|watch\/?\?(?:\S*?&?v\=))|youtu\.be\/)([a-zA-Z0-9_-]{6,11})/gi, - imgur: /(?:https?:)?\/\/(\w+\.)?imgur\.com\/(\S*)(\.[a-zA-Z].{3,4})/i, + imgur: /(?:https?:)?\/\/(\w+\.)?imgur\.com\/(\S*)(\..{3,4})/i, instagram: /(?:https?:\/\/www\.)?instagram\.com\S*?\/(?:p|reel)\/(\w{11})\/?/im }; const mediagroupids = new Set(); @@ -112,7 +112,7 @@ export default async bot => { if(link.match(regex.instagram)) { try { // add --cookies on local instance if you want to avoid getting rate limited - source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.${ext}s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim(); + source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.${ext}" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim(); } catch(err) { if(e.type == 'tg') return await e.editMessageText(msg.result.chat.id, msg.result.message_id, "instagram dl error"); @@ -133,7 +133,7 @@ export default async bot => { } else { try { - source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.${ext}s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim(); + source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.${ext}" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim(); } catch(err) { console.error('err:', err); if(e.type == 'tg') From 5d91ce7d2b872aa0c1a996957c5285ee5d17d96c Mon Sep 17 00:00:00 2001 From: Flummi Date: Wed, 21 Feb 2024 16:26:31 +0100 Subject: [PATCH 9/9] fugg - ytdlp template --- src/inc/trigger/parser.mjs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/inc/trigger/parser.mjs b/src/inc/trigger/parser.mjs index 971c0eb..5a2fc51 100644 --- a/src/inc/trigger/parser.mjs +++ b/src/inc/trigger/parser.mjs @@ -112,7 +112,7 @@ export default async bot => { if(link.match(regex.instagram)) { try { // add --cookies on local instance if you want to avoid getting rate limited - source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.${ext}" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim(); + source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.%(ext)s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim(); } catch(err) { if(e.type == 'tg') return await e.editMessageText(msg.result.chat.id, msg.result.message_id, "instagram dl error"); @@ -133,7 +133,7 @@ export default async bot => { } else { try { - source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.${ext}" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim(); + source = (await queue.exec(`yt-dlp -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' "${link}" --max-filesize ${maxfilesize / 1024}k --postprocessor-args "ffmpeg:-bitexact" -o "./tmp/${uuid}.%(ext)s" --print after_move:filepath --merge-output-format "mp4"`)).stdout.trim(); } catch(err) { console.error('err:', err); if(e.type == 'tg')