Skip to content

YouTube Unsubcriber all

Posted on:June 7, 2024 at 04:06 AM

https://www.youtube.com/feed/channels

let i = 0;

let touchGrass = setInterval(myTimer, 3000);

function myTimer() {
  let els = document
    .getElementById("grid-container")
    .getElementsByClassName("ytd-expanded-shelf-contents-renderer");

  if (i < els.length) {
    els[i].querySelector("[aria-label^='Unsubscribe from']").click();

    setTimeout(function () {
      let unSubBtn = document
        .querySelector("yt-button-renderer#confirm-button button")
        .click();
    }, 2000);

    setTimeout(function () {
      els[i].parentNode.removeChild(els[i]);
    }, 2000);
  }

  i++;

  window.scrollBy(0, window.innerHeight);

  console.log(els.length + " remaining");
}

Touch Some Grass