tx

wangcx

栖迟於一丘,则天下不易其乐
41,286
一键取消所有 YouTube 订阅的脚本 一键取消所有 YouTube 订阅的脚本

在YouTube取消订阅时候,每个取消都需要二次确认,非常麻烦,以下方法可以一次性取消你的所有订阅,且不需要二次确认

var i = 0;
const els = document.getElementsByClassName("style-scope ytd-expanded-shelf-contents-renderer")

function myTimer () {
    if (i < els.length) {
        const t = document.querySelector(`#grid-container > ytd-channel-renderer:nth-child(${i+1})`)

        setTimeout(function () {
            var notificationBtn = t.querySelector("#notification-preference-button > ytd-subscription-notification-toggle-button-renderer-next > yt-button-shape > button > yt-touch-feedback-shape > div > div.yt-spec-touch-feedback-shape__fill").click()
        }, 200);

        setTimeout(function () {
            var serviceBtn = document.querySelector("#items > ytd-menu-service-item-renderer:nth-child(4)").click()
        }, 400);

        setTimeout(function () {
            var yesBtn = document.querySelector("#confirm-button > yt-button-shape > button > yt-touch-feedback-shape > div > div.yt-spec-touch-feedback-shape__fill").click()
        }, 600);
    console.log(i + " unsubscribed");
    }

    i++;
}

var myVar = setInterval(myTimer, 1000);
0 条评论
user 编辑评论信息
插入图片

隐私评论

随机一言

:D 获取中...

文章目录

最新评论