Skip to content

Instantly share code, notes, and snippets.

@EsteveSegura
Created September 28, 2019 15:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save EsteveSegura/554ad1bc1a2d8254204e6460f32e3100 to your computer and use it in GitHub Desktop.
Save EsteveSegura/554ad1bc1a2d8254204e6460f32e3100 to your computer and use it in GitHub Desktop.
follow by interval
//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)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment