Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save ykhorzon/2a58e6b3c6d8d8a8d3fac46ae6192f89 to your computer and use it in GitHub Desktop.
Save ykhorzon/2a58e6b3c6d8d8a8d3fac46ae6192f89 to your computer and use it in GitHub Desktop.
# you have large amount of youtube subscription channel (100+), the this code work well at page https://www.youtube.com/feed/channels
# if the number of subscription is smaller, please change querySelectorAlltarget
var ele = document.querySelectorAll(".yt-uix-button-subscribed-branded");
for(var i=0; i<ele.length; i++){
ele[i].click();
var unsus = document.querySelectorAll(".overlay-confirmation-unsubscribe-button");
console.log(unsus[unsus.length-1].click())
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment