webosbrew / youtube-webos

YouTube app for webOS without ads
GNU General Public License v3.0
491 stars 39 forks source link

Youtube sponsored ads #125

Open simi7777 opened 6 months ago

simi7777 commented 6 months ago

YouTube started showing sponsored ads yesterday, is there a chance to do something about it?

throwaway96 commented 5 months ago

Have you checked other issues to see if any of them describe what you're experiencing?

alyyousuf7 commented 4 months ago

I figured out the issue, but don't know the solution yet 😬

So the user script loads AFTER a couple of requests made by YouTube which has ad tiles or shelf (POST /browse) - so we do not have the JSON.parse proxied at the moment. So we do not get a chance to remove the ads.

Ignore the adblock-yt, that's my Chrome's AdBlock extension, which can have the ability to decide when to load, unlike LG webOS User Script 😞

image

May be we need to find a way to load YouTube after our user script is loaded and executed.

throwaway96 commented 4 months ago

@alyyousuf7

Have you verified that the same thing happens on webOS?

alyyousuf7 commented 4 months ago

Sorry my bad - I tried to wiggle with the responses, even for the first request, and it was able to intercept that too.

I take it back, it's probably not because of user script load order.

However, I noticed that there are different response formats YouTube uses, depending on whether it's a first time request, or subsequent.

One example is the following for /browse API:

The follow is what we cover:

image

However, we do not cover this case (from the same API endpoint, but a different response format):

image

^ Although, this does not show whether it has ad, but the point is, it CAN have ad here.