Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

unsubscribe all youtube channel using javascript

function youtubeUnsubscriber() {
    var count = document.querySelectorAll("ytd-channel-renderer:not(.ytd-item-section-renderer)").length;
    var randomDelay = 500;

    if(count == 0) return false;

    function unsubscribeVisible(randomDelay) {

        if (count == 0) {
            window.scrollTo(0,document.body.scrollHeight);
            setTimeout(function() {
                youtubeUnsubscriber();
            }, 10000)
        }

        unsubscribeButton = document.querySelector('.ytd-subscribe-button-renderer');
        unsubscribeButton.click();

        setTimeout(function () {
            document.getElementById("confirm-button").click()
            count--;
            console.log("Remaining: ", count);

            setTimeout(function () {
                unsubscribedElement = document.querySelector("ytd-channel-renderer");
                unsubscribedElement.parentNode.removeChild(unsubscribedElement);
                unsubscribeVisible(randomDelay)
            }, randomDelay);
        }, randomDelay);
    }

    unsubscribeVisible(randomDelay);
}

youtubeUnsubscriber();
Comment

PREVIOUS NEXT
Code Example
Javascript :: event loop 
Javascript :: create component with module and routing in angular 8 
Javascript :: toggle state react 
Javascript :: jquery table each rows with class 
Javascript :: infinity javascript 
Javascript :: javascript toPrecision() Method 
Javascript :: js get sum by key 
Javascript :: include cookies in fetch 
Javascript :: convert date to timestamp javascript 
Javascript :: reduce array to object javascript 
Javascript :: npm chalk 
Javascript :: how to get which key is pressed in javascript 
Javascript :: element en html and js 
Javascript :: square root numbers in array javascript 
Javascript :: number constructor js 
Javascript :: javascript download current html page 
Javascript :: jquery force page to reload on viewport resize 
Javascript :: stop interval js 
Javascript :: not getting any response with fetch javascript method 
Javascript :: using dto in express 
Javascript :: angular stoppropagatio 
Javascript :: cdn jquery 
Javascript :: javascript how to reverse a string 
Javascript :: getting average of array javascript 
Javascript :: countdown timer in react js 
Javascript :: toast message angular 
Javascript :: jquery addeventlistener wheel 
Javascript :: search inside array with object mongodb 
Javascript :: javascript determine if string is valid url 
Javascript :: reactjs install 
ADD CONTENT
Topic
Content
Source link
Name
3+8 =