Skip to content

Instantly share code, notes, and snippets.

@EsteveSegura
Created September 28, 2019 14:47
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/f4dd7a3325187051b03be169554313a9 to your computer and use it in GitHub Desktop.
Save EsteveSegura/f4dd7a3325187051b03be169554313a9 to your computer and use it in GitHub Desktop.
like randomly
//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)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment