The Un-Official Proxomitron Forum
Google Books/Groups: Remove Ad Blocks - Printable Version

+- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums)
+-- Forum: Proxomitron Config Sets (/forumdisplay.php?fid=43)
+--- Forum: Sidki (/forumdisplay.php?fid=44)
+--- Thread: Google Books/Groups: Remove Ad Blocks (/showthread.php?tid=1223)



Google Books/Groups: Remove Ad Blocks - DarthTrader - Jan. 16, 2009 12:47 PM

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


RE: Google Books/Groups: Remove Ad Blocks - Kye-U - Jan. 16, 2009 09:51 PM

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?hl=en&q=wii&btnG=Search&sitesearch=

http://books.google.com/books?hl=en&q=wii&sa=N&tab=gp


RE: Google Books/Groups: Remove Ad Blocks - DarthTrader - Jan. 16, 2009 10:23 PM

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


RE: Google Books/Groups: Remove Ad Blocks - sidki3003 - Jan. 17, 2009 09:35 AM

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!