Closed terrorist96 closed 4 years ago
Well, yes I need to sign in via my "Cable, Satellite, Or Telco TV Provider", which I do not have, so somebody else will have to come up with a solution.
@@general/ads
gets rid of the adblock message, but video still won't play. Adding @@-720x90-
will fix it. I think.
@terrorist96 do you have a working fix ?
No. It's hard to pin down. Plus, this happened on a relative's computer, and I don't have an account either, so I can't readily reproduce it.
I have a working solution in Nano Defender:
@@||stream.nbcsports.com^$generichide
then (uses Nano Defender Core):
if (a.domCmp(["stream.nbcsports.com"])) {
a.loopbackXHR((ignored, url) => {
if (url.includes(".v.fwmrm.net/ad/g/1")) {
return `<VAST version='3.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='vast.xsd'>
</VAST>`;
}
});
}
if (a.domCmp(["nbcsports.com", "knowyourmeme.com"])) {
a.readOnly("adblockDetect", () => { });
}
if (a.domCmp(["swissadspaysfaucet.com", "swissadspaysethfaucet.com", "stream.nbcsports.com"])) {
a.readOnly("adBlockEnabled", false);
}
I'm 99% sure it works, how to implement it in filters is a whole other story.
could be something like https://github.com/uBlockOrigin/uAssets/issues/218#issuecomment-351215589
? I cannot test the issue.
has anyone else found a solution to this?
"Cable, Satellite, Or Telco TV Provider"
- we need an account
Can someone try:
@@||stream.nbcsports.com^$generichide
||v.fwmrm.net/ad/g/1$xmlhttprequest,domain=stream.nbcsports.com,redirect=nano-tiny-noopvast-3.0
nbcsports.com##script:inject(set-constant.js, adblockDetect, noopFunc)
stream.nbcsports.com##script:inject(set-constant.js, adBlockEnabled, false)
nano-tiny-noopvast-3.0
is defined as:
nano-tiny-noopvast-3.0 text/xml
<VAST version="3.0"></VAST>
@mapx- the filters suggested by @jspenguin2017 work when I login with xfinity/comcast with the supplied link. This event has ended however so I will also try to also test and confirm with a live event (NHL playoffs) tonight.
Getting an adblock warning when I am trying to stream a live event.
Screenshot of adblock message:
logger screenshot:
Is nano-noopvast-3.0
properly defined in your installation of uBO?
This is really difficult to test because the type of account it asks.
@jspenguin2017 probably not, using a test profile with default lists and settings & uBO Extra.
What info do you need from me to help fix & if I add the nano resources to advanced settings option will that properly enable nano-noopvast-3.0
?
if I add the nano resources to advanced settings option will that properly enable
nano-noopvast-3.0
?
Yes, nano-noopvast-3.0
is part of Nano's extra resources.
Oh, actually, it should be nano-tiny-noopvast-3.0
. I updated the rules above.
Updated the rules to the following
@@||stream.nbcsports.com^$generichide ||v.fwmrm.net/ad/g/1$xmlhttprequest,domain=stream.nbcsports.com,redirect=nano-tiny-noopvast-3.0 nbcsports.com##script:inject(set-constant.js, adblockDetect, noopFunc) stream.nbcsports.com##script:inject(set-constant.js, adBlockEnabled, false)
and added NanoResources to userResourcesLocation and still getting adblock message when I hit the play button on the video.
Screenshot of logger with the nano-tiny-noopvast-3.0
request
Can you check if Nano Defender works? The rule is slightly different.
@jspenguin2017 Yes! It now seems to work with Nano Defender installed and uBlock Origin Extra 2.71 disabled.
I followed the Extra Installation Steps for Nano Defender for uBlock Origin and added the additional filter lists as well for anyone else finding this issue in the future...
I'm curious, what is the difference in Nano Defender and how can your fixes be incorporated into base uBlock Origin/UBO Extra installation?
Do you know how to launch a local server? Create a file with following content:
nano-tiny-noopvast-3.0 text/xml
<?xml version="1.0" encoding="UTF-8"?>
<VAST xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="vast.xsd" version="3.0">
</VAST>
Put uBO back to default, disable Nano Defender, load the file from local server into uBO's advanced settings, and add rules above. And let me know if it works.
Alternatively, you can give uBO access to your file system and serve the file directly.
If that didn't work try this one:
nano-tiny-noopvast-3.0 text/xml
<VAST version='3.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='vast.xsd'>
</VAST>
If it still doesn't work then it becomes pretty complicated, the solution in Nano Defender uses a 1730 lines long library.
Assuming I did the local file destination correctly, it doesn't appear to be working when I go back to default filters and uBO + uBO Extra. (I enabled access to file URL's in Extensions page)
One item to note, it seems when Easylist is enabled/disable, the nano-tiny-noopvast-3.0
will be triggered by a different filter. Not sure if that matters at all but including both logger screenshots.
Advanced settings:
Logger with Easylist enabled:
Logger without Easylist enabled:
Adblock message.
the
nano-tiny-noopvast-3.0
will be triggered by a different filter from Easylist
That's not going to be a problem, I have a different payload posted above, can you try that too?
The alt resources.txt payload also does NOT work. I saved it as a separate txt file with unique name just to make sure it wasn't loading from cache or something.
Does the console says something about access control allow origin
?
If yes, then you can try to patch uBO and put the resource in WAR.
Otherwise the fix needs to be a pretty big scriptlet, which gorhill won't accept according to his past decisions.
nbcsports.com##+js(nbcsports-defuser.js)
@@||stream.nbcsports.com^$generichide
nbcsports.com##script:inject(set-constant.js, adblockDetect, noopFunc)
stream.nbcsports.com##script:inject(set-constant.js, adBlockEnabled, false)
nbcsports-defuser.js application/javascript
(() => {
"use strict";
const server = (ignored, url) => {
if (url.includes(".v.fwmrm.net/ad/g/1")) {
return `<VAST version='3.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance' xsi:noNamespaceSchemaLocation='vast.xsd'>
</VAST>`;
}
};
let original;
const newXHR = function (...args) {
const wrapped = new (window.Function.prototype.bind.apply(original, args));
const _open = wrapped.open;
wrapped.open = function (...args) {
const data = server(...args);
if (typeof data === "string") {
window.Object.defineProperties(this, {
"responseText": {
configurable: false,
set() { },
get() {
return data;
},
},
"status": {
configurable: false,
set() { },
get() {
return 200;
},
},
"statusText": {
configurable: false,
set() { },
get() {
return "OK";
},
},
});
}
return _open.apply(wrapped, args);
};
return wrapped;
};
try {
original = window.XMLHttpRequest;
window.XMLHttpRequest = newXHR;
} catch (err) {
window.console.error("[Nano] Failed :: XMLHttpRequest Loopback Engine");
}
})();
Yes, there is an error for Access-Control-Allow-Credentials
in the Console.
If it says Credentials
then WAR probably won't work, I haven't tried it but it's over-complicated anyway.
Yea, this would be really difficult to fix with uBO alone. I don't have a better solution. The scriptlet above is the last resort for a pure-uBO solution, otherwise, there is Nano Defender.
If a solution can't / won't be added to uBlock Origin I've detailed the steps required to fix this for yourself for anyone finding this in the future.
1) Install uBlock Origin 2) Install Nano Defender 3) Follow Nano Defender extra installation steps for uBlock Origin
If you use Nano Defender, the custom filters would not be needed. They are included in the integration filter list (although it wouldn't hurt if you added them).
(Or install Nano Adblocker and Nano Defender which saves you 5 steps)
Updated to remove step 4 with the custom filters
Thanks for looking into this annoying issue! Cannot wait to try it out. Go Caps! 😬
https://old.reddit.com/r/uBlockOrigin/comments/8puy6n/how_to_block_ads_on_nbc_agt/
@gorhill working solution described by jspenguin2017
as a ublock origin user ,requires your review
The solution above works for me!
URL(s) where the issue occurs
http://stream.nbcsports.com/rsn/nba-wizards-live-stream
Describe the issue
Anti-adblock.
Screenshot(s)
Versions
Settings
Default
Notes
May need to sign in.