Created
December 15, 2020 06:58
-
-
Save amblerkr/e8d95635d67e84350fab7d7a19793a6d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
var i = 0; | |
var count = document.querySelectorAll("ytd-channel-renderer:not(.ytd-item-section-renderer)").length; | |
myTimer(); | |
function myTimer () { | |
if (count == 0) return; | |
el = document.querySelector('.ytd-subscribe-button-renderer'); | |
el.click(); | |
setTimeout(function () { | |
var unSubBtn = document.getElementById("confirm-button").click(); | |
i++; | |
count--; | |
console.log(i + " unsubscribed"); | |
console.log(count + " remaining"); | |
setTimeout(function () { | |
el = document.querySelector("ytd-channel-renderer"); | |
el.parentNode.removeChild(el); | |
myTimer(); | |
}, 250); | |
}, 250); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://stackoverflow.com/questions/48874382/how-to-unsubscribe-from-all-the-youtube-channels-at-once/48874466