Git Product home page Git Product logo

Comments (11)

amitbl avatar amitbl commented on June 14, 2024 2

If you wish to block any video with Hindi characters in title put in the filter /[\u0900-\u097F]+/
Please note that India has another 21 languages so I'm not sure which one appears in your search results

from blocktube.

LTGM avatar LTGM commented on June 14, 2024

Okay, thanks. I hope it will filter out most of them so I can ban the remains manually down to zero

from blocktube.

Capripede avatar Capripede commented on June 14, 2024

Any ideas how to block Spanish language videos?

from blocktube.

amitbl avatar amitbl commented on June 14, 2024

Spanish is more tricky because it uses latin letters, but try this one /[ñáéíóúü]+/i

from blocktube.

OldGuyInTheClub avatar OldGuyInTheClub commented on June 14, 2024

Is there a code for the musical note icon that is part of YT's "Official artist channel" names? I tried to copy it to find its associated vale but it is not selectable. That would let me clobber a lot of unwanted content at once.

from blocktube.

Capripede avatar Capripede commented on June 14, 2024

I'm note sure what this icon is. Could you provide a picture?

from blocktube.

OldGuyInTheClub avatar OldGuyInTheClub commented on June 14, 2024

Hope this is readable.

YouTube

I dug into the source through Inspect Element and I think this is called a Verified Artists Badge. I see something similar in other channels only with a checkmark.

When I hide the element below, the checkmark disappears. It seems to be generated from svg as opposed to being an icon. I tried putting the "M0 0h34..." bit into BlockTube without success. It would be slick if there's a way to use this icon as a trigger to block channels. I have no interest in Verified Artists nor 99% of the checkmarked channels. The fragment below is very deep in the HTML hierarchy.

<svg viewBox="0 0 24 24" preserveAspectRatio="xMidYMid meet" focusable="false" class="style-scope yt-icon" style="pointer-events: none; display: block; width: 100%; height: 100%;"><g viewBox="0 0 24 24" class="style-scope yt-icon">
        <path fill="none" d="M0 0h24v24H0z" class="style-scope yt-icon"></path>
        <path d="M12 3v10.55c-.59-.34-1.27-.55-2-.55-2.21 0-4 1.79-4 4s1.79 4 4 4 4-1.79 4-4V7h4V3h-6z" class="style-scope yt-icon"></path>
      </g></svg>

from blocktube.

Capripede avatar Capripede commented on June 14, 2024

I have not fully looked through the code, so I don't know exactly where blocktube looks when filtering by channel ID. Because verified artists badges svg are part of a separate element, a RegEx filter might never be looking in the right place.

My workaround with ublock origin custom filters:

youtube.com##ytd-video-renderer:has(div.badge-style-type-verified-artist)
youtube.com##ytd-compact-video-renderer:has(div.badge-style-type-verified-artist)

verified-youtube

from blocktube.

OldGuyInTheClub avatar OldGuyInTheClub commented on June 14, 2024

That's a great idea! I will try that.

I am having some success with a three tiered approach: Video Block to get rid of "Topics" and "Recommended" sections while BlockTube gives me a lot of finer control over specific channels, keywords, etc. My uBlock experiments were a little too aggressive because I don't know how to write good filters. I think your suggestion will fix that.

Although VideoBlock is abandoned, it seems to work so long as there are not too many filters and it doesn't affect BlockTube as far as I can tell.

[Update: The uBlock filters I copied/pasted aren't hiding the badged channels. Are there any other uBlock settings that need to be on for it to work?]
[Update 2: I think that adding the www. in front of youtube fixed it for me:
www.youtube.com##ytd-video-renderer:has(div.badge-style-type-verified-artist)
www.youtube.com##ytd-compact-video-renderer:has(div.badge-style-type-verified-artist) ]

Still trying to figure out the checkmark. Might be smarter for me to bookmark a video and search from a video page, avoiding the YT homepage entirely. Should have learned javascript and CSS instead of some other languages!

from blocktube.

Capripede avatar Capripede commented on June 14, 2024

To block verified channels with a check mark try this filter:

youtube.com##ytd-video-renderer:has(div.badge-style-type-verified)
youtube.com##ytd-compact-video-renderer:has(div.badge-style-type-verified)

The first line targets search results. The second line targets sidebar results.

from blocktube.

OldGuyInTheClub avatar OldGuyInTheClub commented on June 14, 2024

That's what I tried using your first example as a guide but for some reason it isn't working whether with youtube.com or www.youtube.com

But, it isn't that big a deal anymore since the mix of filters is getting rid of so much uninteresting material that a few checkmarked channels aren't that big a deal.

Thanks for your filters and to amitbl for BlockTube!

from blocktube.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.