[Resolved] golem.de video ads

Alex302

Filters Developer
Staff member
Administrator
We works with it now:)

---------- Post added at 11:51 PM ---------- Previous post was at 10:52 PM ----------

I don't have idea now, but you can try this rules
Code:
ad.doubleclick.net/pfadx/golem/
bs.serving-sys.com/BurstingPipe/adServer.bs
 

avatar

Administrator
Staff member
Administrator
There is no way to block this ad without breaking the video player:(
 

avatar

Administrator
Staff member
Administrator
As we have added a $replace modifier in the latest Adguard beta version, it is now possible to block golem.de video ads.

Here is the rule:
Code:
://*.damoh.golem.de/$replace=/(<VAST(.|\s)*?>)(.|\s)*<\/VAST>/\$1<\/VAST>/,domain=video.golem.de
@Blaz, could you please check it?
 

Blaz

Moderator & Translator
Staff member
Moderator
Sure, will do in about half an hour. What is exact Syntax of this new rule set?
I don't seem to understand the following:

replace=/content\,content/\$0/i,
 

Blaz

Moderator & Translator
Staff member
Moderator
Beer is working fine :)


://*.damoh.golem.de/$replace=/(<VAST(.|\s)*?>)(.|\s)*<\/VAST>/\$1<\/VAST>/,domain=video.golem.de

So this rule searches for "(<VAST(.|\s)*?>)(.|\s)*<\/VAST>".

So syntax rule would be (for what is the $0 or $1)?

/$replace=/what to search for/replace with/

Sadly generic rules aren't working :(

/$replace=/Rule/Beer/ -- filter editor is complaining sadly.
 
Last edited by a moderator:

Blaz

Moderator & Translator
Staff member
Moderator
So syntax rule is:

/$replace=/what to search for/replace with/

Sadly generic rules aren't working.

/$replace=/Rule/Beer/ -- filter editor is complaining sadly (same when used with * at the start).
And when I leave the / at the start, filter editor is not complaining, but replace is not working (only when giving it the url where it should replace it.
 

avatar

Administrator
Staff member
Administrator
(for what is the $0 or $1)?
These are capturing groups. $0 is the whole string found, $1 is the first capturing group.

For the regular expression above:
$0 = string matching (<VAST(.|\s)*?>)(.|\s)*<\/VAST>
$1 = string matching (<VAST(.|\s)*?>)
$2 = string matching (.|\s)
$3 = string matching (.|\s)

Look at regexr link, capturing groups are highlighted there.

Sadly generic rules aren't working :(

/$replace=/Rule/Beer/ -- filter editor is complaining sadly.
It should work, but it's not recommended as if $replace rule is applied everything else ignored.
 

Blaz

Moderator & Translator
Staff member
Moderator
Modified a bit and now working on every site:

*.*/$replace=/Beer/Beer/
*.*/$replace=/rule/Beer/

But on https://www.google.de/search?q=rule it is replaced not everywhere:
Der englische Begriff rule = Regel -- normally it should read "Der englische Begriff Beer = Regel"


Also there should be an additional option to not disabling other rules when replacing text.
 

avatar

Administrator
Staff member
Administrator
Modified a bit and now working on every site:

*.*/$replace=/Beer/Beer/
*.*/$replace=/rule/Beer/

But on https://www.google.de/search?q=rule it is replaced not everywhere:
Der englische Begriff rule = Regel -- normally it should read "Der englische Begriff Beer = Regel"
Maybe that's because google is using query string in some places?


Also there should be an additional option to not disabling other rules when replacing text.
$replace rules are literally a last resort and I don't think we should not make using them a common practice.

There is a couple of drawbacks:
1. Regular expressions are slow
2. Applying $replace rules along with other rules (which may be also a $replace) will make result unpredictable.

As I see it, the common scenario for $replace rule is to change XML or JSON used by the webpage to show ads. For instance, VAST is a great example. You don't need any other rule to be applied in that case.
 

Blaz

Moderator & Translator
Staff member
Moderator
Sometimes the user wants to replace some annoying text like "Posted with Tapatalk ..." in forum posts and when it is used, other ads may be displayed.
 

avatar

Administrator
Staff member
Administrator
Sometimes the user wants to replace some annoying text like "Posted with Tapatalk ..." in forum posts and when it is used, other ads may be displayed.
I got your point. Still I think using $replace rules for this is an overkill.

It's better to remove such things with a JS rule or even a userscript.
What do you use now for replacing?
 

Blaz

Moderator & Translator
Staff member
Moderator
Ad Muncher for non-https sites, sadly it doesn't support https :(
 

Blaz

Moderator & Translator
Staff member
Moderator
Another scenario would be: Disable an adblock detection with replace text rule
 
Top