Created
October 30, 2023 12:08
-
-
Save AhmadIbrahiim/78ba51f26390a53aae38ece2ae3e959e to your computer and use it in GitHub Desktop.
Remove All Accounts that follows you on Twitter (Script / Javascript)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Navigate to : https://twitter.com/<Account>/followers | |
Press F12 and past this code | |
async function unfollow() { | |
const Listofbuttonts = document.querySelectorAll('[data-testid="UserCell"] svg[viewBox="0 0 24 24"]') | |
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)) | |
for (const button of Listofbuttonts) { | |
try { | |
button.parentNode.click() | |
await delay(1000) | |
const confirm = document.querySelector('[data-testid="removeFollower"]') | |
confirm.click() | |
await delay(1000) | |
document.querySelector('[data-testid="confirmationSheetConfirm"]').click() | |
await delay(1000) | |
} catch (error) { | |
console.log(error) | |
} | |
} | |
} | |
unfollow() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment