code-charity / code-charity/youtube

"Members only" video remain visible in various places

Open
#2,874 1 comment 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Bug good first issue help wanted up-for-grabs
Dominant language
JavaScript
Stars
4.6k
Forks
996
Avg merge
2d 15h
Merged PRs (30d)
7

Description

Description:
"Members only" video remain visible in various places. Pretty much the one and only place where they are hidden, are at the channel's own Home page and nowhere else.

Examples:
Image
Adding:
html[it-remove-member-only='true'] ytd-rich-grid-media:has(.badge-style-type-members-only)
to js&css/extension/www.youtube.com/general/general.css should fix this.

Channel's Videos page:
Image
The same rule as the above should fix this.

In recommendations:
Image
Adding
html[it-remove-member-only='true'] ytd-compact-video-renderer:has(.badge-style-type-members-only)
alongside with the above should fix this.

And the same recommended video at the end:
Image

Unlike the above, this element doesn't have any indicators of being "Members only", so "simple" :has() rule likely won't do:

<a class="ytp-videowall-still ytp-videowall-still-round-medium ytp-suggestion-set" target="" aria-label="Comprehensive Battlefront Breakdown: A Strategic Look at Every Front by RFU News — Reporting from Ukraine 2 days ago 5 minutes, 14 seconds" href="https://www.youtube.com/watch?v=YDyWqs0sNcg" data-is-live="false" data-is-list="false" data-is-mix="false" style="left: 194px; top: 110px; width: 190px; height: 106px; transition-delay: 0.2s;"><div class="ytp-videowall-still-image" style="background-image: url(&quot;https://i.ytimg.com/vi/YDyWqs0sNcg/hqdefault.jpg?sqp=-oaymwEnCNACELwBSFryq4qpAxkIARUAAIhCGAHYAQHiAQoIGBACGAY4AUAB&amp;rs=AOn4CLAuoU264rqL0GEIjSpX9A15_2ijZg&quot;);"></div><span class="ytp-videowall-still-info" aria-hidden="true"><span class="ytp-videowall-still-info-bg"><span class="ytp-videowall-still-info-content" style="will-change: opacity;"><span class="ytp-videowall-still-info-title">Comprehensive Battlefront Breakdown: A Strategic Look at Every Front</span><span class="ytp-videowall-still-info-author">RFU News — Reporting from Ukraine</span><span class="ytp-videowall-still-info-live">Live</span><span class="ytp-videowall-still-info-duration">5:14</span></span></span></span><span class="ytp-videowall-still-listlabel-regular ytp-videowall-still-listlabel" aria-hidden="true"><span class="ytp-videowall-still-listlabel-icon"></span>Playlist<span class="ytp-videowall-still-listlabel-length"> (<span></span>)</span></span><span class="ytp-videowall-still-listlabel-mix ytp-videowall-still-listlabel" aria-hidden="true"><span class="ytp-videowall-still-listlabel-mix-icon"></span>Mix<span class="ytp-videowall-still-listlabel-length"> (50+)</span></span></a>

Should be easy to match with a script, since recommended videos at the end are the exact same ones as on the side and seem to be in the same order.

Steps to reproduce this:

  • Enable "Remove members only videos" in "General" settings.
  • Watch a couple video from a channel that has those.
  • Visit YT homepage (might appear there).
  • Watch any video from aforementioned channel (members only from it are more likely to appear there in recommendations, as I know).
  • Scroll to the very end and wait until recommendations pop up above the video player.

Since when?:
Always has been. As I understand, this feature has been implemented only for the channel's "Home" page initially. It was later updated to hide videos on the channel's "Videos" page, but YT changed how the page is generated.

Browser:
Vivaldi 7.3.3635.4 (Stable channel) (64-bit)

Are any errors shown in the Browser-Console?:
Nothing aside list of failed to load elements blocked by uBO.

Does the bug not happen when you log out of YouTube? Then please copy your experiment flags list twice
Probably not? Not sure why would YT recommend to watch "members only" video to users without an account.

Similar open issues:
🐞 "Remove member only videos" not working #2868
Blocking display of member only videos #2472

ImprovedTube Version: 4.1188

Settings:

{"ambient_lighting":false,"channel_hide_featured_content":true,"improvedtube_youtube_icon":"header_right","language":"en-US","lastDarkTheme":"dark","only_one_player_instance_playing":true,"pause_while_typing_on_youtube":false,"player_autoPip":false,"player_hamburger_button":false,"remove_history_shorts":false,"remove_home_page_shorts":true,"remove_member_only":true,"remove_shorts_reel_search_results":true,"remove_subscriptions_shorts":true,"remove_trending_shorts":true,"theme":"dark"}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with js&css/extension/www.youtube.com/general/general.css and reproduce the issue with “Remove members only videos” enabled. Check the channel Videos page, homepage or recommendations, and the end-of-video recommendations, comparing the latter with the side recommendations as described. Done means members-only videos are hidden in each listed location.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, javascript
Domain
frontend, web-dev
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.