Skip to content

Instantly share code, notes, and snippets.

@leo-isso
Last active January 15, 2019 20:31
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save leo-isso/3efe0ffd98066e6fa5df1e7e15956d8c to your computer and use it in GitHub Desktop.
Save leo-isso/3efe0ffd98066e6fa5df1e7e15956d8c to your computer and use it in GitHub Desktop.
Looping comments on Facebook with timeout (so you don't get banned)
let randomString = () => Math.random().toString(36).substring(7)
let delay = 7000
let initialTimer = 7000
let loops = 3500
fetchData = () => {
/**
* COPY THE FETCH HERE
* IDENTIFY THE TEST STRING
* OVERWRITE IT WITH THE randomString()
*/
}
timoutRequest = (timer) => {
setTimeout(() => fetchData(), timer)
// console.log(timer / 1000) // WATCH FROM MANY SECONDS THE FETCH IS GOING TO BE DONE
}
for (let i = 0; i < loops; i++) {
timoutRequest(timer)
initialTimer+=delay
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment