uBlockOrigin / uAssets

Resources for uBlock Origin, uMatrix: static filter lists, ready-to-use rulesets, etc.
GNU General Public License v3.0
4.13k stars 770 forks source link

cbs.com, paramountplus.com => ads, breakage #14849

Closed qshannon closed 1 year ago

qshannon commented 2 years ago

Prerequisites

URL address of the web page

https://www.cbs.com/shows/video/BeUEVjgA5tu47nNfxxolVvIwFMi0YmBj/

Category

ads

Describe the issue

I have been watching shows frequently on CBS, and ads have always been blocked by uBlock until today. The ads now show instead of being blocked. To confirm: I have not made any adjustments to the plugin, other plugins, or any other changes to my viewing experience (browser, etc.).

Screenshot(s)

Screenshot(s) ![Screenshot 2022-09-15 210459](https://user-images.githubusercontent.com/58870561/190477873-1d97dd91-152a-4307-9cd0-2bc55172a269.jpg)

Configuration

```yaml uBlock Origin: 1.44.2 Firefox: 104 filterset (summary): network: 84418 cosmetic: 40634 scriptlet: 17891 html: 747 listset (total-discarded, last updated): default: user-filters: 0-0, never ublock-filters: 33620-261, 1h.5m ublock-badware: 4249-0, 1h.17m ublock-privacy: 263-0, 11d.1h.5m ublock-abuse: 76-0, 11d.1h.4m ublock-unbreak: 1865-0, 1h.18m easylist: 63819-626, 1h.3m easyprivacy: 30588-1697, 1h.4m urlhaus-1: 7835-0, 1h.1m plowe-0: 3671-3, 11d.1h.2m ublock-quick-fixes: 449-0, 1h.2m filterset (user): [empty] trustedset: removed: about-scheme modifiedUserSettings: [none] modifiedHiddenSettings: [none] supportStats: allReadyAfter: 1198 ms maxAssetCacheWait: 421 ms popupPanel: blocked: 2309 blockedDetails: cbs.com: 4 adsafeprotected.com: 1 adsrvr.org: 7 agkn.com: 3 cbsaavideo.com: 5 cbsivideo.com: 13 cedexis.com: 2 conviva.com: 51 demdex.net: 8 doubleclick.net: 11 doubleverify.com: 27 facebook.net: 1 fwmrm.net: 29 google-analytics.com: 11 google.com: 7 googlesyndication.com: 1 imasdk.googleapis.com: 1 imrworldwide.com: 10 imtwjwoasak.com: 1 innovid.com: 29 ispot.tv: 1 krxd.net: 2 moatads.com: 8 mtvnservices.com: 1 ns1p.net: 2 omtrdc.net: 2003 placed.com: 1 rlcdn.com: 1 scorecardresearch.com: 62 sentry.io: 2 stickyadstv.com: 2 videoamp.com: 2 ```
MasterKia commented 2 years ago

Related: https://github.com/uBlockOrigin/uAssets/issues/14813#issuecomment-1245922104

mapx- commented 2 years ago

Adguard fix seems to be this one (so .. untranslatable in uBO for now), replacing / removing the ads from m3u8/mpd

! https://github.com/AdguardTeam/AdguardFilters/issues/129556
! https://github.com/AdguardTeam/AdguardFilters/issues/129658
! TODO: Try to find a way to fix an issue with time of the video
! At the moment, video player shows that time of the video is longer than it really is (time of the video + ads),
! so clicking somewhere after video end causes that the new video starts playing
cbs.com,paramountplus.com#%#(()=>{window.XMLHttpRequest.prototype.open=new Proxy(window.XMLHttpRequest.prototype.open,{apply:async(a,b,c)=>{const d=c[1];return"string"!=typeof d||0===d.length?Reflect.apply(a,b,c):(d.match(/pubads\.g\.doubleclick.net\/ondemand\/hls\/.*\.m3u8/)&&b.addEventListener("readystatechange",function(){if(4===b.readyState){const a=b.response;Object.defineProperty(b,"response",{writable:!0}),Object.defineProperty(b,"responseText",{writable:!0});const c=a.replaceAll(/#EXTINF:(\d|\d\.\d+)\,\nhttps:\/\/redirector\.googlevideo\.com\/videoplayback\?[\s\S]*?&source=dclk_video_ads&[\s\S]*?\n/g,"");b.response=c,b.responseText=c}}),Reflect.apply(a,b,c))}})})();
cbs.com,paramountplus.com#%#(()=>{const a=window.fetch;window.fetch=new Proxy(window.fetch,{apply:async(b,c,d)=>{const e=d[0];if("string"!=typeof e||0===e.length)return Reflect.apply(b,c,d);if(e.match(/pubads\.g\.doubleclick\.net\/ondemand\/.*\/content\/.*\/vid\/.*\/streams\/.*\/manifest\.mpd|pubads\.g\.doubleclick.net\/ondemand\/hls\/.*\.m3u8/)){const b=await a(...d);let c=await b.text();return c=c.replaceAll(/<Period id="(pre|mid|post)-roll-.-ad-[\s\S]*?>[\s\S]*?<\/Period>|#EXTINF:(\d|\d\.\d+)\,\nhttps:\/\/redirector\.googlevideo\.com\/videoplayback\?[\s\S]*?&source=dclk_video_ads&[\s\S]*?\n/g,""),new Response(c)}return Reflect.apply(b,c,d)}})})();
mapx- commented 2 years ago

How to use the Adguard filters (for cbs/ paramountplus) in uBO:

cbs.com,paramountplus.com##+js(cbs)
cbs.com,paramountplus.com##+js(cbs0)

Thanks to Adguard ( @AdamWr ) https://github.com/AdguardTeam/AdguardFilters/issues/129658

ghost commented 2 years ago

@gorhill https://github.com/uBlockOrigin/uAssets/issues/14849#issuecomment-1248962943 https://github.com/brave/adblock-resources/pull/84 https://github.com/brave/adblock-lists/pull/975

gorhill commented 2 years ago

With the new xml-prune scriptlet, this filter works:

cbs.com##+js(xml-prune, Period[id*="-roll-"][id*="-ad-"], , pubads.g.doubleclick.net/ondemand)

I tested only the URL in the opening comment.

MasterKia commented 1 year ago

https://github.com/uBlockOrigin/uAssets/issues/19407

Nezumi-chan commented 1 year ago

I got directed here, but this is almost exactly the opposite of my problem: I don't get ads, but I also don't have my position in shows retained. Will test if the solution here still works for that, but that would be why I didn't actually consider this relevant.

EDIT: The Solution didn't. Do you just... put every problem with the same site under the same issue, even if the actual issues are wildly different? That seems odd, but I'm not in charge of the organization.

stephenhawk8054 commented 1 year ago

@Nezumi-chan Looks like the issue needs a subscribed account to reproduce? We cannot investigate without an account to test. Do you know any free links to reproduce?

Nezumi-chan commented 1 year ago

I do not! Maybe someone else does? Sorry.

stephenhawk8054 commented 1 year ago

@Nezumi-chan If possible, can you test again at each of these steps (by opening new tab and load the website again)?

  1. Turn off all other extensions (not just blocker ones)
  2. Add these filters one-by-one (put a line below the previous line and test again each time), don't add all of them at once:
@@*$script,domain=paramountplus.com
@@*$xhr,domain=paramountplus.com
@@*$image,domain=paramountplus.com
@@*$frame,object,domain=paramountplus.com
@@*$ping,domain=paramountplus.com