Cookies
Instructions
To use this tool, you need to export your login cookies in JSON format and place them in the root directory of the project. Follow these steps:
- Export your login cookies in JSON format and save the file as
exported-cookies.json
. - Place the
exported-cookies.json
file in the root directory of the project. - If you are unsure how to export cookies, refer to the following blog post: Blog.
- Create a file and name it
setCookies.js
and put this code inside:
setCookies.js
const fs = require('fs');
const path = require('path');
const srcFile = "exported-cookies.json";
const targetDir = path.join("node_modules", "@brahmbeyond", "instareel");
if (!fs.existsSync(srcFile)) {
console.error(`Source file ${srcFile} does not exist.`);
process.exit(1);
}
if (!fs.existsSync(targetDir)) {
console.error(`Target directory ${targetDir} does not exist.`);
process.exit(1);
}
fs.copyFileSync(srcFile, path.join(targetDir, srcFile));
console.log("Cookies all set.");
and then run
node setCookies.js
Purpose
The Instagram features are hidden behind a login wall, requiring cookies for access. By following these instructions, you will be able to provide the necessary cookies for the tool to function properly.