Skip to content

Instantly share code, notes, and snippets.

@lshaf
Last active August 8, 2018 16:25
Show Gist options
  • Save lshaf/0ec1f706e49cf35607109bbb043fcbb4 to your computer and use it in GitHub Desktop.
Save lshaf/0ec1f706e49cf35607109bbb043fcbb4 to your computer and use it in GitHub Desktop.
/**
WHAT IS THIS?
- This is script to do auto click unfollow button on instagram
HOW TO USE IT?
- Open your profile after logged in
- Open following tab
- Scroll following window until the bottom (optional)
- Run code below on DevTool Console
CAN I GET BANNED?
Yes, maybe? so use it at your own risk!
Created At 08/08/2018
@author L Shaf <[email protected]>
*/
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
var data = document.querySelectorAll(".NroHT")
async function run() {
console.log("RUNNING " + data.length + " UNFOLLOW");
for (i = 0;i < data.length;i++) {
ele = data[i];
randTime = [
Math.floor((Math.random() * 10) + 1) * 1000,
Math.floor((Math.random() * 10) + 1) * 1000
];
console.log("RUN AND NEXT IN " + (randTime[0] / 1000) + " SECOND(S)");
ele.querySelector(".oF4XW").click();
await sleep(randTime[0]);
console.log("DONE AND NEXT IN " + (randTime[1] / 1000) + " SECOND(S)");
document.querySelector(".pxaFn .aOOlW").click();
await sleep(randTime[1]);
// break a minute so instagram won't notice it as spam or bot
if (i % 10 == 0 && i > 0) {
console.log("Break 1 Minute ");
await sleep(60 * 1000);
}
}
}
run();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment