Last active
September 27, 2023 07:29
-
-
Save sarthaksavvy/88aae5834c1629d49185e88140ae435b to your computer and use it in GitHub Desktop.
Automate Unfollow/Follow
This file contains hidden or 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
Check files inside this gist |
This file contains hidden or 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
let btns = document.querySelectorAll("[data-testid]") | |
let followBtns = Array.from(btns).filter(btn => { | |
return btn.getAttribute('data-testid').includes('follow') | |
}) | |
for (let i = 1; i <= followBtns.length; i++) { | |
setTimeout(() => { | |
followBtns[i - 1].click() | |
}, 1000 * i); | |
} |
This file contains hidden or 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
let btns = document.querySelectorAll("[data-testid]") | |
let unfollowBtns = Array.from(btns).filter(btn => { | |
return btn.getAttribute('data-testid').includes('unfollow') | |
}) | |
for (let i = 1; i <= unfollowBtns.length; i++) { | |
setTimeout(() => { | |
unfollowBtns[i-1].click() | |
setTimeout(() => { | |
document.querySelector("[data-testid='confirmationSheetConfirm']").click() | |
}, 500); | |
}, 1000 * i); | |
} |
hey , how to get the follow script unlimited?
@sarthaksavvy I want to know that i want to make a script that will unfollow everyone that dosnt follow you. How i do that?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
hey how do we set the actual number instead of using the .length() ? and can we set the pause to our own time