Skip to content

Comments

Updated youtube.js to fix the Subscribe button not being clicked.#32

Open
AhmedNSane wants to merge 1 commit into256cub:masterfrom
AhmedNSane:patch-1
Open

Updated youtube.js to fix the Subscribe button not being clicked.#32
AhmedNSane wants to merge 1 commit into256cub:masterfrom
AhmedNSane:patch-1

Conversation

@AhmedNSane
Copy link

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

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
@SergiuPogor
Copy link
Collaborator

Status: Fixed

Thank you for the fix suggestion! We have incorporated a similar fix in commit 9ec9194.

Changes made:

The subscribe button selector was updated to use multiple fallbacks:

  • .yt-spec-button-shape-next--filled > div:nth-child(1) (new YouTube UI)
  • .ytd-subscribe-button-renderer (legacy)
  • #subscribe-button

This ensures the Subscribe button is clicked regardless of which YouTube UI version is being used.

See commit: 9ec9194

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants