Skip to content

Instantly share code, notes, and snippets.

@axhuwastaken
Created January 24, 2024 13:24
Show Gist options
  • Save axhuwastaken/dc657674edf78f7d1d531058dc80f9c3 to your computer and use it in GitHub Desktop.
Save axhuwastaken/dc657674edf78f7d1d531058dc80f9c3 to your computer and use it in GitHub Desktop.
JavaScript code to perform mass/auto unfollow on Instagram
let i = 0;
let count = 181;
const unfollowInterval = setInterval(() => {
if (i >= count) {
clearInterval(unfollowInterval);
return;
}
let list = document.querySelectorAll('button');
if (list[i].innerText === "Following") {
list[i].click()
let unfollow = document.getElementsByClassName("_a9-- _ap36 _a9-_")[0]
unfollow.click()
// console.log("unfollowed" + i)
}
i++;
}, 2000);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment