Skip to content

Instantly share code, notes, and snippets.

@PreetSangha
Last active September 20, 2022 09:34
Show Gist options
  • Save PreetSangha/24021c86c058002f288fbad202e71630 to your computer and use it in GitHub Desktop.
Save PreetSangha/24021c86c058002f288fbad202e71630 to your computer and use it in GitHub Desktop.
delete all youtube subs fixed 2022-09-22
// orgininally from : https://gist.github.com/igorferreira/2f728b0b2a46abb47412f56d5af4bd55
// first access url: https://www.youtube.com/feed/channels
// then keep scrolling down until you reach the end of ALL of your channels
// then go into the developer tools | cosole and paste this script
var i = 0;
var count = document.querySelectorAll("ytd-channel-renderer:not(.ytd-item-section-renderer)").length;
deleteChannels();
function deleteChannels () {
if (count == 0) {
console.log(i + " channesls found");
return;
}
// clicked the subscribed buttome
el = document.querySelector('.ytd-button-renderer');
el.click();
setTimeout(() => {
i++;
count--;
console.log(i + " unsubscribed");
console.log(count + " remaining");
setTimeout( () => {
// click the unsubscribe button
el = document.querySelector("ytd-channel-renderer");
el.parentNode.removeChild(el);
deleteChannels();
}, 250);
}, 250);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment