Skip to content

Instantly share code, notes, and snippets.

@selimslab selimslab/follower.js

Last active Aug 9, 2019
Embed
What would you like to do?
2 lines bot
follow_buttons = $$('[data-testid$="follow"]')
follow_buttons.forEach(button => button.click())
console.log(unfollow_button)
following = $$('div[data-testid="UserCell"]')
following.forEach(
f => {
if (!f.textContent.includes("Follows you")) {
unfollow_button = f.querySelector('[data-testid$="-unfollow"]')
if (unfollow_button != null) {
unfollow_button.click()
}
}
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.