Last active
December 21, 2022 14:20
-
-
Save dongarchive/9c4e2aed43e73c7554b5c74855dc063e to your computer and use it in GitHub Desktop.
Follow and unfollow instagram script - ApplyBoard
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
// ------------------- | |
// To mass follow | |
// ------------------- | |
// 1. Open instagram page (eg. https://www.instagram.com/visatoronto/) utilizing google chrome | |
// 2. Click 'xxx followers' on instagram page, this will open up a modal containing user's followers | |
// 3. Open google chrome developer tools by either (1) right clicking on the screen and clicking 'inspect' | |
// OR (2) Command + Option + J | |
// 4. Click on the 'console' method in dev tools | |
// 5. First paste the following code to instantiate jquery and press enter | |
let script = document.createElement("script"); | |
script.setAttribute('src', '//code.jquery.com/jquery-latest.min.js'); | |
script.addEventListener('load', function() { | |
let script = document.createElement('script'); | |
document.body.appendChild(script); | |
}, false); | |
document.body.appendChild(script); | |
// 6. Then paste this into the console to allow mass following and press enter | |
window.setInterval(function() { | |
// Set counter to follow | |
var x = 0; | |
$("button:contains('Follow')").each(function() { | |
// Limit to only follow 12 people every interval | |
if (x == 12) { | |
return false; | |
} | |
// Filter out following and follow buttons | |
if ($(this).text() != 'Follow') { | |
return; | |
} | |
// // Only click on follow buttons | |
$(this).trigger("click"); | |
// Add to the counter | |
x++; | |
// Scroll down | |
$('.j6cq2').scrollTop($('.j6cq2')[0].scrollHeight); | |
}) | |
}, 1000 * 60 * 15); // Call every 15 minutes | |
// ------------------- | |
// To mass unfollow | |
// ------------------- | |
// 1. Open instagram page (eg. https://www.instagram.com/visatoronto/) utilizing google chrome | |
// 2. Click 'xxx following' on instagram page, this will open up a modal containing all the user's the user is following | |
// 3. Open google chrome developer tools by either (1) right clicking on the screen and clicking 'inspect' | |
// OR (2) Command + Option + J | |
// 4. Click on the 'console' method in dev tools | |
// 5. Paste the following code to instantiate jquery and press enter | |
let script = document.createElement("script"); | |
script.setAttribute('src', '//code.jquery.com/jquery-latest.min.js'); | |
script.addEventListener('load', function() { | |
let script = document.createElement('script'); | |
document.body.appendChild(script); | |
}, false); | |
document.body.appendChild(script); | |
// 6. Paste this into the console to allow mass unfollowing and press enter | |
window.setInterval(function() { | |
// Start counter to follow | |
var x = 0; | |
$("button:contains('Following')").each(function() { | |
// Limit to only unfollow 12 people every interval | |
if (x == 12) { | |
return false; | |
} | |
// // Only click on following buttons | |
$(this).trigger("click"); | |
// Add to the counter | |
x++; | |
// Scroll down | |
$('.j6cq2').scrollTop($('.j6cq2')[0].scrollHeight); | |
}) | |
}, 1000 * 60 * 15); // Call every 15 minutes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Could you whitelist people that are following you back or is it one or the other only?