Post Reply 
[Kye-U] Google Ads...
Feb. 18, 2009, 02:43 PM
Post: #1
[Kye-U] Google Ads...
there's some intermittent top-of-page ads showing up with this Google Search -
http://www.google.com/search?q=firewall%20small
Add Thank You Quote this message in a reply
Feb. 18, 2009, 09:13 PM
Post: #2
RE: [Kye-U] Google Ads...
Did it say 'Sponsored Link' instead of the normal 'Sponsored Links' plural? As you mention they're not always generated.

Here's a partial snippet, a DIV with id=tads. Maybe by 'tads' they mean transient ads? Sinister
Code:
<div id=tads><h2 style="float:right;margin:3px 3px 0">Sponsored Link</h2><ol onmouseover=

Sorry if this post is irrelevant. I don't understand the Proxo language, yet it appeared to me the config would have detected that DIV.
Add Thank You Quote this message in a reply
Feb. 19, 2009, 05:01 AM
Post: #3
RE: [Kye-U] Google Ads...
I've spent the last 15 minutes refreshing that page, and the only thing I notice is that sometimes there isn't an ad block, and sometimes there is. When there is, there is a space that appears:

Code:
<!-- PROX-S: Removed by Google Ad Links Filter (mbEnd.) -->
<div id="topspace">&nbsp;</div>

Graycode, your post wasn't irrelevant at all! I'll further test this through a US proxy... I'm thinking it's location-specific.

EDIT: Same results with several US proxies =[
Visit this user's website
Add Thank You Quote this message in a reply
Feb. 19, 2009, 05:51 AM
Post: #4
RE: [Kye-U] Google Ads...
Maybe state specific? I get this with a CA based proxy:

Dbug:
Code:
<Match: Google Search: Remove Ad Blocks     8.08.21 (multi) [sd jd] (d.s) >
<table id=mbEnd  width=30% style=margin-bottom:1em><tr><td id=rhsline style="padding-left:10px;border-left:1px solid #c9d7f1" class=std><h2 style="text-align:center;margin:0;padding:0">Sponsored Links</h2><ol onmouseover="return true" class=nobr>

...snip...

<table class="ts ti"><tr><td><div class="csb mbi"></div></table>
</Match>

<!-- PROX-S: Removed by Google Ad Links Filter (mbEnd.) -->
<div id="topspace">&nbsp;</div>
<a href=# onclick="return false" class=mblink>Show products from Newegg.com</a></span>

...snip...

</ol><p>&nbsp;<tr><td id=rhspad></table>


Looks like the uncaught ad code is still part of the "mbEnd" table. Maybe use $NEST/$INEST? Then again, it *might* break things, look at all these unclosed tags!

BTW, wonder if the IP expressions in the URL Match are still needed. What do you think?

I'm attaching the bweb'ed relevant code.


Attached File(s)
.txt  topads_bweb.txt (Size: 2.59 KB / Downloads: 992)
Add Thank You Quote this message in a reply
Feb. 19, 2009, 06:13 AM
Post: #5
RE: [Kye-U] Google Ads...
Thanks Wink

I've revised the filter (used $INEST):

Code:
[Patterns]
Name = "Google Search: Remove Ad Blocks     8.08.21 (multi) [sd jd] (d.s) ku#test-20090219"
Active = TRUE
Multi = TRUE
URL = "$TYPE(htm)www.google."
Limit = 32704
Match = "<("
        ""
        "("
        "table[^>]++(id=$AV(mbEnd)$SET(#=mbEnd.)|width=(25%$SET(#=width25.)|30%$SET(#=width30.)))"
        "|!-- Strip Me -->$SET(#=strip.)"
        ")"
        "$INEST(<table,</table >)"
        "(*</table >(^ [^<]| <table)|*(????????)\2(^?)$SET(0= <!-- Strip Me -->\2))"
        ""
        "|div("
        " style=[^>]+> <font$INEST(<div,*href=$AV(/history\?*)$SET(#=history-d.)*,</div)</div >|[^>]++id="
        "$AV(tpa[0-9]+$SET(#=tpa.)|tads$SET(#=tads.)|side_section$SET(#=side.))$INEST(<div,</div)</div >"
        ")"
        "|table ("
        "cellpadding=0 cellspacing=0 border=0> <tr> <td valign[^>]+>( <font[^>]+>)+{2}([a-z]+ :)\#"
        "$INEST(<table,</table)</table >"
        "|[^>]+> <tr> <td (^class)[^>]+> (<(/td > <td[^<]+<|)(/+font[^<]+<)+|([^<]+</+br+ > )+<)"
        "a href=$AV("
        "/history\?$SET(#=history.)*"
        "|*//(tool(bar|s).|checkout.|desktop.|pack.|survey.|webaccelerator.)\#google.*"
        ")$INEST(<table,</table)</table >( <br*>|)"
        "|[^>]++width=$AV(100%) style=$AV(border: 1px solid*)$INEST(<table,</table)</table >$SET(#=custom-ad.)"
        ")"
        "|center> <font"
        "$INEST(<center,*//(tool(bar|s).|checkout.|desktop.|pack.|webaccelerator.)\#google.*,</center)"
        "</center >( <(br|p)>)+"
        "|td rowspan=[#2] > <a\s[^>/]+//(tool(bar|s)|checkout|desktop|pack|webaccelerator)\#.google."
        "$INEST(<td,</td)</td > </tr > <tr> $NEST(<td,</td >)$SET(#= td.)"
        "|p>( <font[^>]+>)+[^<]+<a\s[^>/]+//(books.)\#google.[^<]+</a >( </font >)+ <br>"
        "(^(^<br clear=all>|<table))"
        ""
        ")"
Replace = "\r\n<!-- PROX-S: Removed by Google Ad Links Filter (\@) -->\r\n\0"
          "$SET(sSpec=$GET(sSpec)\@)"

I don't think the IP expressions in the URL match are needed; it doesn't really hurt to leave them in there, but I think that 99% of the time, users will be on a "www.google." URL.
Visit this user's website
Add Thank You Quote this message in a reply
Feb. 19, 2009, 06:27 AM
Post: #6
RE: [Kye-U] Google Ads...
Now that was quick!

I'll use that version. I think it breaks "Strip Me" slicing of gigantic tables, but that's okay, that way we see if this routine - and hence multi-match - is still needed. Smile!
Add Thank You Quote this message in a reply
Feb. 19, 2009, 06:31 AM
Post: #7
RE: [Kye-U] Google Ads...
A little note: I think to not break the "Strip Me" slicing, we just need to move $INEST(<table,</table >) to be after 30%$SET(#=width30.))) ;) But then I'm not too sure if this removes everything...
Visit this user's website
Add Thank You Quote this message in a reply
Feb. 19, 2009, 06:53 AM
Post: #8
RE: [Kye-U] Google Ads...
But what would set the first "<table>...<!-- Strip Me -->" then?
I mean the part that is looking for the closing table tag and - if not found after 30K - adds the comment.
I think it may work if going like: First try $INEST -- On fail add comment.

Anyway, i haven't seen this part match for ages. OTOH & IIRC, it always has been a US only thing.

edit: ProxRocks will tell us, if it's still required!
Add Thank You Quote this message in a reply
Feb. 19, 2009, 09:27 AM
Post: #9
RE: [Kye-U] Google Ads...
(Feb. 19, 2009 06:53 AM)sidki3003 Wrote:  Anyway, i haven't seen this part match for ages. OTOH & IIRC, it always has been a US only thing.

edit: ProxRocks will tell us, if it's still required!

some pre-lim test-searches is showing that it might not be needed anymore...

for now, let's keep it in for the public release...
i'll "break" the code in my day-to-day config and see if it results in an ad block sneaking in...
Add Thank You Quote this message in a reply
Feb. 19, 2009, 01:22 PM
Post: #10
RE: [Kye-U] Google Ads...
Sure.

I doubt that it's an ideal time to do final code changes anyway. To me it looks like Google is experimenting a lot right now, i get another layout on almost every reload. One of them swallows part of the logo (see screen cap), due to:
Code:
#logo{...width:94px;height:34px;...}

But again, they are obviously just playing around...


Attached File(s)
.png  cap_135351.png (Size: 7.22 KB / Downloads: 735)
Add Thank You Quote this message in a reply
Feb. 21, 2009, 08:07 AM
Post: #11
RE: [Kye-U] Google Ads...
I came across the "Sponsored Link" just now:

Code:
<div><h2 style="float:right;margin:3px 3px 0">Sponsored Link</h2><ol onmouseover="return true" style="padding:3px 0"><li class=tas><h3><a id=pa1 href="/aclk?sa=l&amp;ai=CjTeLKLSfSaf_GNj--Qb7scynDeyX0WKuuanLC4eqmwUIABABIMeC9wVQocaXcGD9iIyB6AOgAZyEvv4DyAEBqgQgT9CIwoHumrY7EU-Rj3Nn-FeR26Q89tVr4K_kTZvGCn0&amp;sig=AGiWqtw9f5L_1m7TRIjq6bKYVYh067vSHw&amp;q=http://www.StopSign.com/se/%3Fn%3Ds_gg_01%26kw%3Dgg_frx_vscn_2_1111_t20081216_se_viruses%2520scan">Free <b>Virus Scan</b></a></h3><cite>www.StopSign.com/Free<b>VirusScan</b></cite>&nbsp; &nbsp; &nbsp; You could be infected. You need to Be Protected Right Away. Go Now!</ol></div>

Updated the filter:

Code:
[Patterns]
Name = "Google Search: Remove Ad Blocks     8.08.21 (multi) [sd jd] (d.s) ku-20090221"
Active = TRUE
Multi = TRUE
URL = "$TYPE(htm)(www.google|64.233.1[#60:91]|66.(102.[#0:15]|249.[#64:95])|72.14.[#192:255]|216.239.[#32:63])."
Limit = 32704
Match = "<("
        ""
        "("
        "table[^>]++(id=$AV(mbEnd)$SET(#=mbEnd.)|width=(25%$SET(#=width25.)|30%$SET(#=width30.)))"
        "|!-- Strip Me -->$SET(#=strip.)"
        ")"
        "$INEST(<table,</table >)"
        "(*</table >( <div id="topspace">\&nbsp;</div>|)(^ [^<]| <table)|*(????????)\2(^?)$SET(0= <!-- Strip Me -->\2))"
        ""
        "|div("
        " style=[^>]+> <font$INEST(<div,*href=$AV(/history\?*)$SET(#=history-d.)*,</div)</div >|([^>]++id="
        "$AV(tpa[0-9]+$SET(#=tpa.)|tads$SET(#=tads.)|side_section$SET(#=side.))|><h2[^>]+>Sponsored$SET(#=sponsfloat.))$INEST(<div,</div)</div >"
        ")"
        "|table ("
        "cellpadding=0 cellspacing=0 border=0> <tr> <td valign[^>]+>( <font[^>]+>)+{2}([a-z]+ :)\#"
        "$INEST(<table,</table)</table >"
        "|[^>]+> <tr> <td (^class)[^>]+> (<(/td > <td[^<]+<|)(/+font[^<]+<)+|([^<]+</+br+ > )+<)"
        "a href=$AV("
        "/history\?$SET(#=history.)*"
        "|*//(tool(bar|s).|checkout.|desktop.|pack.|survey.|webaccelerator.)\#google.*"
        ")$INEST(<table,</table)</table >( <br*>|)"
        "|[^>]++width=$AV(100%) style=$AV(border: 1px solid*)$INEST(<table,</table)</table >$SET(#=custom-ad.)"
        ")"
        "|center> <font"
        "$INEST(<center,*//(tool(bar|s).|checkout.|desktop.|pack.|webaccelerator.)\#google.*,</center)"
        "</center >( <(br|p)>)+"
        "|td rowspan=[#2] > <a\s[^>/]+//(tool(bar|s)|checkout|desktop|pack|webaccelerator)\#.google."
        "$INEST(<td,</td)</td > </tr > <tr> $NEST(<td,</td >)$SET(#= td.)"
        "|p>( <font[^>]+>)+[^<]+<a\s[^>/]+//(books.)\#google.[^<]+</a >( </font >)+ <br>"
        "(^(^<br clear=all>|<table))"
        ""
        ")"
Replace = "\r\n<!-- PROX-S: Removed by Google Ad Links Filter (\@) -->\r\n\0"
          "$SET(sSpec=$GET(sSpec)\@)"

In case anyone's wondering, my search query was msn avast scan for viruses
Visit this user's website
Add Thank You Quote this message in a reply
Feb. 21, 2009, 11:01 AM
Post: #12
RE: [Kye-U] Google Ads...
Kye-U, the "topspace" div is (conditionally) inserted by "Google Search: Alternate Display", and is picked up by the CSS, IIRC to keep the top spacing stable for the different layouts. Dunno if it's still needed, but if not, it should be removed from the CSS as well.


I've got another glitch, only visible with "red chevron" (&esrch=BetaShortcuts) searches, which is my default. The filter missed it, because the survey domain changed from survey.google.com to survey.googleratings.com (other domains *might* follow).

Code:
<table class=ts align=center>
<tr><td style="background:#ff9;padding:5px;text-align:center">You are trying the
<b>Keyboard shortcuts</b> experiment.<br><a href="https://survey.googleratings.com/wix/p1231344.aspx">Take
our survey</a> | <a href="http://www.google.com/experimental/#BetaShortcuts">Return
to experiments overview</a></table>

Mod (after being nice and taking their survey): .google. -> .google(ratings|).


Since this is currently WIP anyway, i'd like to post a test version with table-slicing removed and multi-match turned off. Also, i've XXXed JD's old code, because i have no idea if it still matches. Someone just say "Stop!!", if i'm going too far. Wink

We did decide to drop the IP range test, right? So, with Kye-U's $INEST and sponsor fixes, and my survey fix, that would be:
Code:
[Patterns]
Name = "Google Search: Remove Ad Blocks     9.02.21 [sd ku jd] (d.s) TEST3"
Active = TRUE
URL = "$TYPE(htm)www.google."
Limit = 32766
Match = "<("
        "table[^>]++(id=$AV(mbEnd)$SET(#=mbEnd.)|XXXwidth=(25%$SET(#=width25.)|30%$SET(#=width30.)))"
        "$INEST(<table,</table)</table >"
        "|div("
        " style=[^>]+> <font$INEST(<div,*href=$AV(/history\?*)$SET(#=history-d.)*,</div)</div >"
        "|([^>]++id=$AV(tpa[0-9]+$SET(#=tpa.)|tads$SET(#=tads.)|side_section$SET(#=side.))"
        "|> <h2[^>]+>Sponsored$SET(#=sponsfloat.))$INEST(<div,</div)</div >"
        ")"
        "|table ("
        "cellpadding=0 cellspacing=0 border=0> <tr> <td valign[^>]+>( <font[^>]+>)+{2}([a-z]+ :)\#"
        "$INEST(<table,</table)</table >"
        "|[^>]+> <tr> <td (^class)[^>]+> (<(/td > <td[^<]+<|)(/+font[^<]+<)+|([^<]+</+br+ > )+<)"
        "a href=$AV("
        "/history\?$SET(#=history.)*"
        "|*//(tool(bar|s).|checkout.|desktop.|pack.|survey.|webaccelerator.)\#google(ratings|).*"
        ")$INEST(<table,</table)</table >( <br*>|)"
        "|[^>]++width=$AV(100%) style=$AV(border: 1px solid*)$INEST(<table,</table)</table >$SET(#=custom-ad.)"
        ")"
        "|center> <font$INEST(<center,"
        "*//(tool(bar|s).|checkout.|desktop.|pack.|webaccelerator.)\#google(ratings|).*"
        ",</center)</center >( <(br|p)>)+"
        "|td rowspan=[#2] > <a\s[^>/]+//(tool(bar|s)|checkout|desktop|pack|webaccelerator)\#.google(ratings|)."
        "$INEST(<td,</td)</td > </tr > <tr> $NEST(<td,</td >)$SET(#= td.)"
        "|p>( <font[^>]+>)+[^<]+<a\s[^>/]+//(books.)\#google.[^<]+</a >( </font >)+ <br>"
        "(^(^<br clear=all>|<table))"
        ""
        ")"
Replace = "\r\n<!-- PROX-S: Removed by Google Ad Links Filter (\@) -->\r\n\0"
          "$SET(sSpec=$GET(sSpec)\@)"
Add Thank You Quote this message in a reply
Feb. 21, 2009, 12:38 PM
Post: #13
RE: [Kye-U] Google Ads...
(Feb. 21, 2009 11:01 AM)sidki3003 Wrote:  Someone just say "Stop!!", if i'm going too far. Wink

lol... all seems OK here...
i've axed that for a few days now and have had no sneak-in ad blocks...
i was still running multi though, not sure if that makes a difference...
Add Thank You Quote this message in a reply
Mar. 03, 2009, 06:40 PM
Post: #14
RE: [Kye-U] Google Ads...
Removing previously XXXed code entirely, adding a new ID suggested by ProxRocks, removing TEST flag.

Can someone please confirm that it works (esp. without JD's "width" tests)?
I'd like to point to a couple of these updated filters in the "Confirmed Fixes" sticky.

Code:
[Patterns]
Name = "Google Search: Remove Ad Blocks     9.03.03 [sd ku] (d.s)"
Active = TRUE
URL = "$TYPE(htm)www.google."
Limit = 32766
Match = "<("
        "table[^>]++id=$AV(mbEnd)$SET(#=mbEnd.)$INEST(<table,</table)</table >"
        "|div("
        " style=[^>]+> <font$INEST(<div,*href=$AV(/history\?*)$SET(#=history-d.)*,</div)</div >"
        "|([^>]++id=$AV(tpa[0-9]+$SET(#=tpa.)|tads$SET(#=tads.)|side_section$SET(#=side.)|ietb$SET(#=ietb.))"
        "|> <h2[^>]+>Sponsored$SET(#=sponsfloat.))$INEST(<div,</div)</div >"
        ")"
        "|table ("
        "cellpadding=0 cellspacing=0 border=0> <tr> <td valign[^>]+>( <font[^>]+>)+{2}([a-z]+ :)\#"
        "$INEST(<table,</table)</table >"
        "|[^>]+> <tr> <td (^class)[^>]+> (<(/td > <td[^<]+<|)(/+font[^<]+<)+|([^<]+</+br+ > )+<)"
        "a href=$AV("
        "/history\?$SET(#=history.)*"
        "|*//(tool(bar|s).|checkout.|desktop.|pack.|survey.|webaccelerator.)\#google(ratings|).*"
        ")$INEST(<table,</table)</table >( <br*>|)"
        "|[^>]++width=$AV(100%) style=$AV(border: 1px solid*)$INEST(<table,</table)</table >$SET(#=custom-ad.)"
        ")"
        "|center> <font$INEST(<center,"
        "*//(tool(bar|s).|checkout.|desktop.|pack.|webaccelerator.)\#google(ratings|).*"
        ",</center)</center >( <(br|p)>)+"
        "|td rowspan=[#2] > <a\s[^>/]+//(tool(bar|s)|checkout|desktop|pack|webaccelerator)\#.google(ratings|)."
        "$INEST(<td,</td)</td > </tr > <tr> $NEST(<td,</td >)$SET(#= td.)"
        "|p>( <font[^>]+>)+[^<]+<a\s[^>/]+//(books.)\#google.[^<]+</a >( </font >)+ <br>"
        "(^(^<br clear=all>|<table))"
        ""
        ")"
Replace = "\r\n<!-- PROX-S: Removed by Google Ad Links Filter (\@) -->\r\n\0"
          "$SET(sSpec=$GET(sSpec)\@)"
Add Thank You Quote this message in a reply
Mar. 03, 2009, 10:24 PM
Post: #15
RE: [Kye-U] Google Ads...
Adding back "TEST" flag, till i'm sure it works...
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: