How to unsubscribe from dozens of YouTube channels in one go?

2024-03-27 11:30:05

Over the years, we can be tempted to subscribe to all kinds of channels YouTubeYouTube. And by necessity, YouTube models the program it offers us based on such subscriptions. However, as our tastes can change, we end up with video suggestions that no longer correspond to what we want to watch in the present.

Unsubscribe from a single channel

It is possible to manually unsubscribe from a given channel by going to youtube.com and selecting “Subscriptions”, then “Manage”. From the “Subscriber” button, you can then choose “Unsubscribe”.

How to get a transcription of a Youtube video

However, if you subscribe to hundreds of channels, canceling subscriptions one by one can be tedious, to say the least.

An unsubscribe script

The problem is that YouTube does not offer any mechanism for unsubscribing from several channels at once. So what to do? It turns out that your browser can run scripts written in Javascript. The solution therefore consists of using a script which will unsubscribe one by one from all the YouTube channels to which you are affiliated. All without exception. Once the operation is completed, you can always reactivate the subscription of the few channels that are really important to you.

However, the advantage with Javascript is that there is a multitude of scripts that experienced programmers have written and put online. And this is the case for unsubscribing from multiple channels. The script that we offer here has been spotted on the Stackoverflow website.

Here’s what this script contains – you don’t have to know how to program in Javascript to use it, we’ll show you how to do it.

Le script Javascript

(async function iife() {

// This is the time delay after which the “unsubscribe” button is “clicked”; Tweak to your liking!

var UNSUBSCRIBE_DELAY_TIME = 2000;

/**

* Delay runner. Wraps `setTimeout` so it can be `await`ed on.

* @param {Function} fn

* @param {number} delay

*/

var wait = (delay) =>

new Promise((resolve, reject) => {

setTimeout(() => {

resolve();

}, delay);

});

// Get the channel list; this can be considered a row in the page.

var channels = Array.from(

document.querySelectorAll(

“ytd-subscription-notification-toggle-button-renderer-next > yt-button-shape > button”

)

);

console.log(`${channels.length} channels found.`);

var ctr = 0;

for (const channel of channels) {

try {

// Get the subsribe button and trigger a “click”

channel.click();

await wait(100);

document

.querySelector(“#items > ytd-menu-service-item-renderer:nth-child(4)”)

.click();

await wait(800);

document.querySelector(“#confirm-button > yt-button-shape > button > yt-touch-feedback-shape”).click();

await wait(UNSUBSCRIBE_DELAY_TIME);

console.log(`Unsubsribed ${ctr + 1}/${channels.length}`);

ctr++;

} catch (e) {

console.error(e);

}

}

})();

Go to YouTube.com and click “Subscriptions” near the top in the left column. Once your subscriptions page is displayed, click “Manage”. The list of channels to which you are subscribed appears on the screen.

Right-click anywhere on this page (on a Mac, the combination is Ctrl-click) and then choose “Inspect.” You see sequences of codes appearing which will probably not make sense to you. Don’t worry about it. Simply select “Console” from the menu.

At the bottom of this windowwindow, locate the “>” sign. This is where you will paste the script indicated above. But just before that, type the following statement: “ allow pasting ».

This indicates that the console must accept that you paste code.

Now paste the Javascript script shown above. Then press “Enter”.

And there you have it, this script will unsubscribe you from all your YouTube channels. If there are hundreds, it will take a good hour, so be patient.

Create a song with artificial intelligence

Resubscribe

Once complete, you can close the console interface and browse the list of channels you have unsubscribed from. All that remains is to reactivate the subscription of those who really matter to you.

How to change the background of a video with artificial intelligence without a green screen?

1711658559
#unsubscribe #dozens #YouTube #channels

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.