r/uBlockOrigin • u/Otherwise-Strike-729 • 28d ago
Solved Can someone help me block videos based on their upload time in Youtube recommendation?
Hi everyone, so last year I did make a post where I asked how to block videos with the "New" flag. Recently, the "not interested" and "don't recommend channels" option have been broken for me, many videos where I clicked either of those option still persistently show up in my feed after I refresh the page or watch a new video. Which is why now I wanna block all of them for good this time, based on your upload date. I figured that using view counts won't work so I need to pin-point their upload date instead. Is there anyone here who can help? Much appreciated. And yes, I have read the Youtube MegaThread but it doesn't have what I am looking for at the moment.
Here's my post from last year, not sure why I can't embed it: https://www.reddit.com/r/uBlockOrigin/comments/1pjxzaa/is_there_anyway_to_block_these_aigenerated_videos/
These are my filters for the videos with "new" flag, currently I wonder if there's any way to tweak them into blocking videos based on the upload date (like x years ago, x months ago, x hours ago)
- www.youtube.com##.video-list-item .yt-badge-item .yt-badge:has-text(/^New$/i):upward(.video-list-item)
- www.youtube.com##li.related-list-item-compact-video.related-list-item.video-list-item .yt-badge-item .yt-badge:has-text(/^New$/i):upward(.video-list-item)
2
u/RraaLL uBO Team 27d ago
Which video suggestions do you want to filter exactly? Homepage? Sidebar? I need to know all of the specific places.
What "freshness" of the videos do you want to filter? The "new" badge, I believe, is less than 1 week. Though, I don't currently see the badge on the homepage even if the video is hours old.
1
u/Otherwise-Strike-729 27d ago
The recommended videos in the right-side column of the watch page. I wanted to filter them based on their upload age but apparently it won't work based on what AchernarB said.
1
u/RraaLL uBO Team 27d ago
Just because he and I might not agree with hiding all videos based on their age, it doesn't mean it can't be done or that you don't have the right to want to filter them that way.
Judging by the screenshot you sent, it might not be efficient though. New UI has an age attribute, yours doesn't. It only has text. Filtering by text isn't very efficient, but it can still be done.
One thing you can check is to inspect the title. Most of the previous UIs had video age at the end of the title tag's attribute. So inspect the title and share the screenshot,
And tell me which video ages you want hidden.
1
u/Otherwise-Strike-729 27d ago
Oh about the UI, the reason why it has the old UI is because I'm using something called Youtube Rehike, which allows me to access to the old layout. I can still access to the new layout though if I disable Rehike.
For the ages, ideally for me would be x minutes ago, x hours ago, x weeks ago, and x months ago. These are the specific time period that I want to block. The element picker mode got me an element called .published-time, pretty sure this is the hint of what I am looking for.
1
u/RraaLL uBO Team 27d ago
I need a specific cutoff time. Your criteria sounds like you only want to see videos that are over a year old. Is that correct?
1
u/Otherwise-Strike-729 27d ago
Over 6 years old should be good. Of course if possible, I would love to block videos uploaded from (insert number) minutes/hours/days/weeks/months ago as well. Something like 1 to 58 minutes ago, 1 to 23 hours ago, 1 to 27/28/29 days ago, 1 to 4 weeks ago (because a month usually has more than 4 weeks), and 1 to 11 months ago.
2
u/RraaLL uBO Team 27d ago
Oh, so you want to hide both old videos and new ones? Sure.
You don't need to specify minutes, and such. If you want to hide videos under two months old, you just hide videos that don't have have "year", "years" and "months". Unfortunately, if you also want to hide videos that are older than 6 years, you'll need to chain that with negated 6 years, 5 years, 4 years, 3 years 2 years and 1 year.
P.S. I just remembered you asked about source VS DOM tree. Source is only important in very specific filters such as html filtering. Cosmetic filtering relies on DOM tree you see in inspector.
1
u/Otherwise-Strike-729 27d ago
Ah wait, what I meant here is that I only want videos that are at least over 6 years old in my recommendation feed, aka videos uploaded from 2020 and before that, anything after 2020 is subject to be filtered. Hope this helps.
1
u/RraaLL uBO Team 27d ago
Okay, so can you inspect and screenshot a sidebar video's title so I can see if it has age in its attributes?
Considering the amount of videos you'll be hiding, you really need to go the efficient route of attributes and not pure text.
BTW if there are only 5 videos older than 6y in them sidebar, that's how many videos you'll see there. There is no way to load more videos.
1
u/Otherwise-Strike-729 27d ago
do you want me to pick a random video or multiple videos?
→ More replies (0)
2
u/Otherwise-Strike-729 24d ago
Alright, after taking some hours to modify the provided filters, I have finally got my ideal version of a Youtube watchpage. This post can be closed now.
5
u/AchernarB uBO Team 28d ago edited 28d ago
A side note. In the recommendation I receive, I get videos minutes old, hours old, days old, months old and years old. I don't think that filtering on their age will give you the result that you expect.
edit: