Skip to content

Instantly share code, notes, and snippets.

@egeste
Created May 29, 2018 21:55
Show Gist options
  • Star 4 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save egeste/3db7c8442bf3afdd169746cacb9fb9a0 to your computer and use it in GitHub Desktop.
Save egeste/3db7c8442bf3afdd169746cacb9fb9a0 to your computer and use it in GitHub Desktop.
Unfollow all on soundcloud
// 1. Go to https://soundcloud.com/you/following
// 2. Open javascript console.
// 3. Paste & hit <enter>
const unfollow = function() {
const button = document.querySelector('.sc-button-follow')
button && button.click()
button && setTimeout(unfollow, 0)
}; unfollow();
@ChrisCohan
Copy link

Doesn't seem to be working for me.

@egeste
Copy link
Author

egeste commented Feb 12, 2020

@ChrisCohan it looks like it should work given the current code I see at https://soundcloud.com/you/following

Can you share any error output or screenshots?

@tomasmark79
Copy link

image

@tomasmark79
Copy link

The script still clicks on one user and does not proceed to the next.

@message
Copy link

message commented Jan 15, 2021

// 1. Go to https://soundcloud.com/you/following
// 2. Load all users that you follow (scroll to the end of the page until list is fully loaded) 
// 3. Open javascript console.
// 4. Paste & hit <enter>
(() => {
  // Time to sleep between requests in ms
  const sleepMin = 500;
  const sleepMax = 1000;

  async function sleep(msec) {
    return new Promise(resolve => setTimeout(resolve, msec));
  }

  async function unfollow() {
    const $badges = document.querySelectorAll('.userBadgeListItem');
    const badgesCount = $badges.length;

    for (let i = 0; i < badgesCount; i++) {
      const $badge = $badges[i]
      const $title = $badge.querySelector('.userBadgeListItem__heading');
      const $button = $badge.querySelector('.sc-button-follow');

      const title = $title.innerText;

      if ($button) {
        console.log("[%s/%s] Unfollowing \"%s\"", i + 1, badgesCount, title);
        $button.click();
        await sleep(Math.floor(Math.random() * (sleepMax - sleepMin + 1)) + sleepMin);
      } else {
        console.warn("[%s/%s] Already unfollowed \"%s\"", i + 1, badgesCount, title);
      }
    }

    console.log("Done");
  }

  unfollow();
})();

@egeste
Copy link
Author

egeste commented Jan 16, 2021

The script still clicks on one user and does not proceed to the next.

From the output it looks like you're getting rate limited. Google http 429 error

@sebrodsebrod
Copy link

Worked well.

@sebrodsebrod
Copy link

Actually, It says I am following 26 people, but I used the code to unfollow everyone. Once I click on "following" it says I don't follow anyone. Weird. Anyone know what's going on?

@thrailer
Copy link

thrailer commented Mar 3, 2021

code worked! thanks, but can you make a code that will follow for example 80 people from a soundcloud profile when you go to his followers

@mia-riezebos
Copy link

my fork of this gist has a working version.

@fernandopalafox
Copy link

Worked as intended. Thanks!

@ELIJHV
Copy link

ELIJHV commented May 25, 2023

Hey can u send a working unreposter script thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment