Created
May 29, 2018 21:55
-
-
Save egeste/3db7c8442bf3afdd169746cacb9fb9a0 to your computer and use it in GitHub Desktop.
Unfollow all on soundcloud
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
// 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(); |
// 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();
})();
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
Worked well.
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?
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
my fork of this gist has a working version.
Worked as intended. Thanks!
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
The script still clicks on one user and does not proceed to the next.