Post Reply 
Google Books/Groups: Remove Ad Blocks
Jan. 16, 2009, 12:47 PM
Post: #1
Google Books/Groups: Remove Ad Blocks
Hello Everyone,

There is a small problem with the "Google Books/Groups: Remove Ad Blocks" filter. It removes the "sort by relevance" and "sorted by date" options normally found on the right hand side of the page after doing a search. Could someone find a fix for this, please?

TIA,
DarthTrader
Add Thank You Quote this message in a reply
Jan. 16, 2009, 09:51 PM
Post: #2
RE: Google Books/Groups: Remove Ad Blocks
Code:
[Patterns]
Name = "Google Books/Groups: Remove Ad Blocks     6.09.02 [jd sd] (d.s) [un-ku 090116]"
Active = TRUE
URL = "$TYPE(htm)(books|groups).google."
Limit = 32766
Match = "<table\s[^>]++id=$AV((adt|rhssection))$SET(1=adtable)
        "("
        "$INEST(<table,</table)</table >"
        "|$SET(0=<table style="display:none">)*>"
        ")"
Replace = "\r\n<!-- PROX-S: Removed by Google Books/Groups Filter (\1) -->\r\n\0"
          "$SET(sSpec=$GET(sSpec)\1)"

This should fix it. Please let me know if it works for you Wink
Thanks for pointing this out!

Test links:

http://groups.google.com/groups/search?h...itesearch=

http://books.google.com/books?hl=en&q=wii&sa=N&tab=gp
Visit this user's website
Add Thank You Quote this message in a reply
Jan. 16, 2009, 10:23 PM
Post: #3
RE: Google Books/Groups: Remove Ad Blocks
Thanks, Kye-U, your filter works great! It's much more scientific than the brute force filter I came up with: Smile!
Code:
[Patterns]
Name = "Google Books/Groups: Remove Ad Blocks     8.12.26 [jd sd] (d.s) test"
Active = TRUE
URL = "$TYPE(htm)(books|groups).google."
Bounds = "$NEST(<table,</table*>)"
Limit = 32766
Match = "\1(Sponsored Links)*"
Replace = "\1</td></tr></table></td></tr></table>\r\n"

DarthTrader
Add Thank You Quote this message in a reply
Jan. 17, 2009, 09:35 AM
Post: #4
RE: Google Books/Groups: Remove Ad Blocks
Added. One little change: $AV(adt|rhssection&\1) . (In contrast to JS, "|" is more sticky than "&".)

Code:
[Patterns]
Name = "Google Books/Groups: Remove Ad Blocks     9.01.17 [jd ku sd] (d.s)"
Active = TRUE
URL = "$TYPE(htm)(books|groups).google."
Limit = 32766
Match = "<table\s[^>]++id=$AV(adt|rhssection&\1)"
        "("
        "$INEST(<table,</table)</table >"
        "|$SET(0=<table style="display:none">)*>"
        ")"
Replace = "\r\n<!-- PROX-S: Removed by Google Books/Groups Filter (\1) -->\r\n\0"
          "$SET(sSpec=$GET(sSpec)\1)"

And thanks for the test links. Smile!
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: