One of the most widely utilized and popular video streaming sites is YouTube. So, if you’re bored at home or on the road, YouTube is always ready to entertain you. On this platform, there are millions of content creators who produce compelling content for their members. You can subscribe to your favorite YouTube content creators to receive regular updates on their latest posts.
Mass Unsubscribe Using Inspect Element Feature
You can use the Inspect Element feature on your browser to run a code that will automatically unsubscribe you from all your YouTube channels.
To do this task, you must sign in to your YouTube account. Follow by accessing your list of subscribed channels as previously described.
Then, continue scrolling until you reach the final channel, thus displaying all your channels on the screen.
From here, select Inspect or Inspect Element by right-clicking on the screen. At the top, choose the Console tab.
Subsequently, duplicate the given code into the base of the Console window. To finalize the process, press Enter.
/**
* YouTube bulk unsubscribe fn.
* Wrapping this in an IIFE for browser compatibility.
*/
(async function iife() {
// get the button elements
const buttons = document.querySelectorAll(
'ytd-subscription-button-renderer > paper-button'
);
// loop over them
for (let button of buttons) {
// check if subscribed
if (button.hasAttribute('subscribed')) {
// click button
button.click();
// wait a bit
await new Promise((resolve) => setTimeout(resolve, 200));
}
}
})();
Mass Unsubscribe YouTube Channels Using Script
You can obviously unsubscribe from a YouTube channel if you don’t like it. When you wish to unsubscribe from 1000 channels at once, the difficulty arises. That would be ridiculous.
There is, however, an easy way to unsubscribe from all of the channels at once using a JavaScript script.
- You must first log into your YouTube account (obviously).
- To get a list of all subscriptions, go to the “Subscriptions” tab.
- To manage your subscription lists, go to the top-right corner and click “MANAGE.”
- You’ll be taken to the channel page, where the script will be run. This page can be accessed straight from your browser by clicking on this link.
- By right-clicking on an empty section of the page and selecting “Inspect,” you can inspect the webpage.
- Scroll to the bottom of the Console tab until you see the “>” symbol. The script will be run from this location.
- Copy the script below to automate the unsubscription of YouTube channels in bulk.
var i = 0;
var count = document.querySelectorAll(
"ytd-channel-renderer:not(.ytd-item-section-renderer)"
);
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("channel " + i + " unsubscribed");
setTimeout(function () {
el = document.querySelector("ytd-channel-renderer");
el.parentNode.removeChild(el);
myTimer();
}, 250);
}, 250);
}
- Press enter after pasting the automation script into the terminal.
- The script will run, and all of the channels will be unsubscribed one by one. I improved the code, and you should now see better logs on the right.
If the script fails, simply refresh the page and try again.
The unsubscription process will finally be finished. I was subscribed to around 1000 channels, so it took a long time.
I hope you found the information helpful and were able to successfully unsubscribe from all of the undesirable channels.