From d4ac155c68f0c898b0a8feeaec6afd2e551db4bd Mon Sep 17 00:00:00 2001 From: Abu Ottermann Date: Mon, 19 Feb 2024 21:52:20 +0100 Subject: [PATCH] making me latest change return fuck instagram --- 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 f936bdf..b940eff 100644 --- a/src/inc/trigger/parser.mjs +++ b/src/inc/trigger/parser.mjs @@ -55,7 +55,7 @@ export default async bot => { return await e.reply(`fuck imgur... seriously`); if(regex.instagram.test(link)) - await e.reply(`insta link`); + return await e.reply(`fuck instagram... seriously`); // check repost (link) repost = await queue.checkrepostlink(link); @@ -73,7 +73,7 @@ export default async bot => { // 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 --cookies /opt/f0ck/qutecookies.txt -f 'bv*[height<=720]+ba/b[height<=720] / wv*+ba/w' --skip-download --dump-json "${link}"`)).stdout); + 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"]; @@ -107,7 +107,8 @@ export default async bot => { try { if(regex.instagram.test(link)) try { - source = (await queue.exec(`yt-dlp --cookies /opt/f0ck/qutecookies.txt -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(); + // 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");