Blog

Instagram bot script that unfollows users

I already wrote about the script to follow people on Instagram but I was asked to create a new one that will unfollow the users.

You use this script as any other one. You paste it in the Console but first:

  1. Go to your profile
  2. Open the Following popup
  3. Now open the Console pressing Ctrl + Shift + J (Windows / Linux) or Cmd + Opt + J (Mac) 
  4. Copy the code below and paste it into the Console tab 
  5. Press Enter and that’s it

 

// Updated: 2019-05-16
 // This script is made for demonstrative purposes only. 
 // Use at your own risk. 
 // Respect the Instagram's policy and terms of use.
function initUnFollow(i) {
    setTimeout(function(){
        console.log('Unfollowing…');
        inputs[i].click(); 
      unfollow();  }, Math.floor((Math.random() * 100000))+5);
 }
  function unfollow(){
    setTimeout(function(){
  var btn = document.querySelectorAll('div[role="presentation"]:nth-child(2n) button:first-child'); btn[1].click();  }, 1000);
 }
 var inputs = document.querySelectorAll('div[role="dialog"] li button');
  for(var i=1; i<inputs.length;i++) {
    initUnFollow(i);
  }

Note: It will be a good idea not to use this script on a long lists because you can get banned.

If the script is not working for you, let me know in the comments so I can  fix the issues or leave a thumbs up if all is good. 

If you have new ideas, requests, let’s hear it! 🙂

Did you like this? Share it!

0 comments on “Instagram bot script that unfollows users

Leave Comment