Created
November 5, 2024 20:19
-
-
Save je4npw/c6e40b82de9afc1a6adaa214376e5a99 to your computer and use it in GitHub Desktop.
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
(async function(){ | |
const UNFOLLOW_LIMIT = 800 | |
const delay = (ms) => new Promise(_ => setTimeout(_, ms)) | |
const findButton = (txt) => [...document.querySelectorAll("button").entries()].map(([pos, btn]) => btn).filter(btn => btn.innerText === txt)[0] | |
console.log("Start") | |
for (let i = 0; i < UNFOLLOW_LIMIT; i++) { | |
const $next = findButton("Seguindo") | |
if (!$next) { continue } | |
$next.scrollIntoViewIfNeeded() | |
$next.click() | |
await delay(100) | |
$confirm = findButton("Deixar de seguir") | |
if ($confirm) { | |
$confirm.click() | |
} | |
await delay(20 * 1000) // Aguarde 20s, 200 unfollows é o limite por hora | |
console.log(`Unfollowed #${i}`) | |
} | |
console.log("Fim") | |
})() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment