Backup of instagram comments to mongodb.
Disclaimer: Please Note that this is a research project. I am by no means responsible for any usage of this tool. Use on your own behalf. I’m also not responsible if your accounts get banned due to extensive use of this tool.
yarn install
This script will create mongod.conf file and all mongo folders where the DB will be saved
yarn setup
yarn mongo:start
Additionally it is possible to stop mongo with yarn.
yarn mongo:stop
You need to create a script to be executed by the cron task. This script will define environment variables of the Instagram image to backup and the DB path where the comments are saved.
#!/bin/sh
CRON=true MONGODB_URI=mongodb://localhost CODE=PHOTO_SHORTCODE /usr/local/bin/node index
NOTE: node path should be absolute and point to the node bin file in the file system
This is how to setup a cron job to execute the script
env EDITOR=nano crontab -e
This scrip will execute at minute 0 every two hours.
0 */2 * * * cd PATH_TO_FOLDER && ./CRON_SCRIPT.sh
crontab -l