From d74d68f70e52c48a68022b27d8e58148fe57b2f4 Mon Sep 17 00:00:00 2001 From: Arc <90333108+lastarc@users.noreply.github.com> Date: Mon, 29 Apr 2024 12:38:46 +0200 Subject: [PATCH] feat(bot): add cookies.txt --- bot/commands/media/instagram.js | 2 +- bot/commands/media/tiktok.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bot/commands/media/instagram.js b/bot/commands/media/instagram.js index fd9931d..b3aea21 100644 --- a/bot/commands/media/instagram.js +++ b/bot/commands/media/instagram.js @@ -56,7 +56,7 @@ module.exports = { // download the video execSync('mkdir -p tmp/instagram'); try { - execSync(`yt-dlp -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best -S vcodec:h264 -o ./tmp/instagram/${hash}.mp4 ` + videoUrl, { + execSync(`yt-dlp --cookies ./cookies.txt -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best -S vcodec:h264 -o ./tmp/instagram/${hash}.mp4 ` + videoUrl, { stdio: 'inherit', }); } catch (e) { diff --git a/bot/commands/media/tiktok.js b/bot/commands/media/tiktok.js index 29de553..0ae298c 100644 --- a/bot/commands/media/tiktok.js +++ b/bot/commands/media/tiktok.js @@ -56,7 +56,7 @@ module.exports = { // download the video execSync('mkdir -p tmp/tiktok'); try { - execSync(`yt-dlp -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best -S vcodec:h264 -o ./tmp/tiktok/${hash}.mp4 ` + videoUrl, { + execSync(`yt-dlp --cookies ./cookies.txt -f bestvideo[ext=mp4]+bestaudio[ext=m4a]/best[ext=mp4]/best -S vcodec:h264 -o ./tmp/tiktok/${hash}.mp4 ` + videoUrl, { stdio: 'inherit', }); } catch (e) {