[Resolved] golem.de video ads

Discussion in 'Missed Ads' started by Pine, Aug 16, 2014.

  1. Pine

    Pine New Member

    Joined:
    Jun 6, 2014
    Messages:
    4
  2. Pine

    Pine New Member

    Joined:
    Jun 6, 2014
    Messages:
    4
    No idea?
     
  3. Alex302

    Alex302 Filters Developer Staff Member Administrator

    Joined:
    Jul 20, 2012
    Messages:
    22,975
    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
     
  4. Pine

    Pine New Member

    Joined:
    Jun 6, 2014
    Messages:
    4
    If i did it right, it seems not to work so far. :(
     
  5. avatar

    avatar Administrator Staff Member Administrator

    Joined:
    Oct 26, 2010
    Messages:
    12,891
    There is no way to block this ad without breaking the video player:(
     
  6. Pine

    Pine New Member

    Joined:
    Jun 6, 2014
    Messages:
    4
    That's a bad news, but thanks anyway :).
     
  7. avatar

    avatar Administrator Staff Member Administrator

    Joined:
    Oct 26, 2010
    Messages:
    12,891
    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?
     
  8. Blaz

    Blaz Moderator & Translator Moderator

    Joined:
    Dec 21, 2014
    Messages:
    8,271
    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,
     
  9. avatar

    avatar Administrator Staff Member Administrator

    Joined:
    Oct 26, 2010
    Messages:
    12,891
  10. Blaz

    Blaz Moderator & Translator Moderator

    Joined:
    Dec 21, 2014
    Messages:
    8,271
    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: Dec 20, 2015
  11. avatar

    avatar Administrator Staff Member Administrator

    Joined:
    Oct 26, 2010
    Messages:
    12,891
    I've updated $replace issue on github with more information about the syntax.

    Also look at how it works here:
    http://regexr.com/3cesk
     
  12. Blaz

    Blaz Moderator & Translator Moderator

    Joined:
    Dec 21, 2014
    Messages:
    8,271
    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.
     
  13. avatar

    avatar Administrator Staff Member Administrator

    Joined:
    Oct 26, 2010
    Messages:
    12,891
    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.

    It should work, but it's not recommended as if $replace rule is applied everything else ignored.
     
  14. Blaz

    Blaz Moderator & Translator Moderator

    Joined:
    Dec 21, 2014
    Messages:
    8,271
    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.
     
  15. avatar

    avatar Administrator Staff Member Administrator

    Joined:
    Oct 26, 2010
    Messages:
    12,891
    Maybe that's because google is using query string in some places?


    $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.
     
  16. Blaz

    Blaz Moderator & Translator Moderator

    Joined:
    Dec 21, 2014
    Messages:
    8,271
    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.
     
  17. avatar

    avatar Administrator Staff Member Administrator

    Joined:
    Oct 26, 2010
    Messages:
    12,891
    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?
     
  18. Blaz

    Blaz Moderator & Translator Moderator

    Joined:
    Dec 21, 2014
    Messages:
    8,271
    Ad Muncher for non-https sites, sadly it doesn't support https :(
     
  19. avatar

    avatar Administrator Staff Member Administrator

    Joined:
    Oct 26, 2010
    Messages:
    12,891
    Yeah, I understand, just want to get the idea of what you need.
     
  20. Blaz

    Blaz Moderator & Translator Moderator

    Joined:
    Dec 21, 2014
    Messages:
    8,271
    Another scenario would be: Disable an adblock detection with replace text rule