-
-
Save chaodonghu/c25c7ee3e3eb85c0a0de051892e596a4 to your computer and use it in GitHub Desktop.
// Run GOOGLE CHROME - WORKING AS OF MARCH 23 2025 | |
// Please @ me in the comments if this stops working, I will try to get it working again within the month | |
// INSTRUCTIONS | |
// 1. Open Instagram in Chrome | |
// 2. Click on "followers" on any Instagram profile so you can see the list of followers | |
// 3. Open developer tools by right clicking on the page and clicking "INSPECT" | |
// 4. Copy the code below and paste in the developer tools console and press enter to run | |
// 5. Script will not run if tab is navigated away from, minimized of unfocused (It is recommended to open a new chrome window or push tab to the side and let script run in background) | |
const followEveryone = (async () => { | |
// Modify these variables to your liking | |
// FOLLOW_LIMIT is the number of users to follow (this is set to 1000) | |
const FOLLOW_LIMIT = 1000; | |
const BREAK_DURATION = 5 * 60 * 1000; // 5 minutes break | |
const TOTAL_DURATION = 10 * 60 * 1000; // 10 minutes duration - Timeout after 10 minutes | |
const delay = (ms) => new Promise((resolve) => setTimeout(resolve, ms)); | |
// Find target button | |
const findButtonByText = (text) => | |
Array.from(document.querySelectorAll("button")).find( | |
(button) => button.innerText === text | |
); | |
console.log("Start follow script..."); | |
let startTime = new Date().getTime(); | |
// Track the number of follows | |
let followCount = 0; | |
while (new Date().getTime() - startTime < TOTAL_DURATION) { | |
for (let i = 0; i < FOLLOW_LIMIT; i++) { | |
// FOLLOW_INTERVAL is the interval between follows | |
// Increase FOLLOW_INTERVAL if you are getting rate limited | |
// Set this to 0 follow as quickly as possible - not recommended | |
// Random follow interval for each follow to avoid rate limiting minimum 5 seconds | |
// This gets reset to a random number every loop | |
const FOLLOW_INTERVAL = Math.floor(Math.random() * 10 + 1) * 5000; | |
const followButton = findButtonByText("Follow"); | |
if (!followButton) { | |
console.log("No more users to follow or unable to find button."); | |
break; | |
} | |
followButton.scrollIntoViewIfNeeded(); | |
await followButton.click(); | |
await delay(100); // Short delay to ensure button is clicked | |
followCount++; | |
console.log(`Followed #${followCount}`); | |
console.log(`Wait ${FOLLOW_INTERVAL} milliseconds`); | |
await delay(FOLLOW_INTERVAL); | |
} | |
console.log(`Taking a break for ${BREAK_DURATION / 1000 / 60} minutes...`); | |
await delay(BREAK_DURATION); // Take a break to avoid rate limiting | |
startTime = new Date().getTime(); // Reset start time for the next cycle | |
} | |
console.log("Follow script complete!"); | |
})(); |
When trying to load the console, the console outputs the following error:
![]()
@flocked That's a warning by instagram, you can ignore that and paste the script above. Or dismiss it
Estimado al parecer no me está andando. Me dice:
"no more users to follow or unable to find button"
"Taking a break for 5 munutes..."
Estoy en la pagina del perfil, elegi seguidores y deje la ventana flotante de seguidores. Ejecuté el script y me sale eso. Le adjuntó captura
@matiaspata You need to have the "followers" or "following" pane open. Can you confirm that they are open and there's a "Follow" button on the page? Just tested it, and it appears to work fine as long as the instructions are followed correctly.
I'm not sure if the script is still maintained but it got detected and forced to change my password which is expected yet after the password change i ran the script again and it liked one person then instagram restricted me to follow/unfollow for 7 days
I'm not sure if the script is still maintained but it got detected and forced to change my password which is expected yet after the password change i ran the script again and it liked one person then instagram restricted me to follow/unfollow for 7 days
@canberkvarli Yes, it's still being actively maintained. What you're experiencing seems more like Instagram detecting activity rather than an issue with the script itself. You may need to pause liking, following, and unfollowing for a few days, as Instagram has likely flagged your actions as unusual or bot-like.
I'm not sure if the script is still maintained but it got detected and forced to change my password which is expected yet after the password change i ran the script again and it liked one person then instagram restricted me to follow/unfollow for 7 days
@canberkvarli Yes, it's still being actively maintained. What you're experiencing seems more like Instagram detecting activity rather than an issue with the script itself. You may need to pause liking, following, and unfollowing for a few days, as Instagram has likely flagged your actions as unusual or bot-like.
Beautiful, thank you for the fast response!
For the record, instagram shuts you off after following users, thinking as spam indeed. On the phone there is an option to "Verify that's me" which fixes back things back to normal. I just did that and it's working now. I'll keep you updated if they come up with something more stricter
@alpsn You would have to change the variables
You won't get banned, instagram will usually detect that theres some scripting going on in your account and you might get locked but you will just be required to reset your password.