This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
IG_USERNAME=userInstagram | |
IG_PASSWORD=********** |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tfi = require('tools-for-instagram'); //require of tools-for-instagram | |
//login in instagram | |
let ig = login(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tfi = require('tools-for-instagram'); | |
//tfi doing login | |
let ig = login(); | |
//hashtags on which we are going to act | |
const hashtags =[ | |
"vegan", | |
"vegetarian", | |
"govegan", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tfi = require('tools-for-instagram'); | |
//tfi doing login | |
let ig = await login(); | |
//hashtags on which we are going to act | |
const hashtags =[ | |
"vegan", | |
"vegetarian", | |
"govegan", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//we create a function to get all the hashtags we want | |
async function getPostsFromHashtags(ig,arrayOfHashtags){ | |
//Create an empty array to store all hashtags | |
let allPosts = [] | |
//We go through the entire list of hashtags and add it to our empty array | |
for(let i = 0 ; i < arrayOfHashtags.length ; i++){ | |
let hashtagActual = await recentHashtagList(ig,arrayOfHashtags[i]) | |
allPosts.push(hashtagActual) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const tfi = require('tools-for-instagram'); | |
//hashtags on which we are going to act | |
const hashtags =[ | |
"vegan", | |
"vegetarian", | |
"govegan", | |
"veganfood", | |
"organic", | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
This function generates a random number between a minimum and a maximum | |
including the extremes within the returned range | |
*/ | |
function randomIntInc(min, max) { | |
return Math.floor(Math.random() * (max - min + 1) + min) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Get all post from hashtags | |
let allPosts = await getPostsFromHashtags(ig,hashtags) | |
/* | |
We go through the entire array to find photos | |
randomly and also like with an irregular interval | |
between 3 seconds and 220 seconds | |
*/ | |
for(let i = 0 ; i < likesPerInterval ; i++){ | |
await sleep(randomIntInc(3,220)) | |
likeMediaId(ig,allPosts[randomIntInc(0,allPosts.length)].pk) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//we create a function to get all the hashtags we want | |
async function getPostsFromHashtags(ig,arrayOfHashtags){ | |
//Create an empty array to store all hashtags | |
let allPosts = [] | |
//We go through the entire list of hashtags and add it to our empty array | |
for(let i = 0 ; i < arrayOfHashtags.length ; i++){ | |
let hashtagActual = await recentHashtagList(ig,arrayOfHashtags[i]) | |
allPosts.push(hashtagActual) | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Get all users from hashtags | |
let allPosts = await getPostsFromHashtags(ig,hashtags) | |
/* | |
We go through the entire array to users | |
randomly and also follow with an irregular interval | |
between 3 seconds and 220 seconds | |
*/ | |
for(let i = 0 ; i < followsPerInterval ; i++){ | |
await sleep(randomIntInc(3,220)) | |
followUser(ig,allPosts[randomIntInc(0,allPosts.length)].user.pk) |
OlderNewer