From ceade4b94665370ac39f90b982364330fcbe1be3 Mon Sep 17 00:00:00 2001 From: Ahmed Anssaien <43837678+MrAnssaien@users.noreply.github.com> Date: Mon, 26 Jun 2023 01:41:13 +0100 Subject: [PATCH] Updated youtube.js to fix the Subscribe button not being clicked. The "Subscribe" button wasn't being clicked, so I changed the CSS selector from '.ytd-subscribe-button-renderer' to '.yt-spec-button-shape-next--filled > div:nth-child(1)', and now it's working perfectly --- networks/youtube.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/networks/youtube.js b/networks/youtube.js index 6145463..3359708 100644 --- a/networks/youtube.js +++ b/networks/youtube.js @@ -15,8 +15,8 @@ function do_yt_sub() { state = _STATE_WAIT_TO_CLOSE; wait_time = generateRandom(5, 8); - - const buttons = document.querySelectorAll('.ytd-subscribe-button-renderer'); + //The "Subscribe" button wasn't being clicked, so I changed the CSS selector from '.ytd-subscribe-button-renderer' to '.yt-spec-button-shape-next--filled > div:nth-child(1)', and now it's working perfectly + const buttons = document.querySelectorAll('.yt-spec-button-shape-next--filled > div:nth-child(1)'); if ((!buttons) || (buttons.length < 1)) { console.log("No Subscribe button found :()"); return; @@ -64,4 +64,4 @@ function do_youtube() { do_yt_like(); return; } -} \ No newline at end of file +}