Skip to content

Instantly share code, notes, and snippets.

View ykhorzon's full-sized avatar
🎼
Play with melody

ykhorizon ykhorzon

🎼
Play with melody
View GitHub Profile
# 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())
}
// 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())
}