Post Reply 
imagebam.com - Direct Image
Sep. 01, 2009, 01:14 AM
Post: #1
imagebam.com - Direct Image
Filter out all but the candy for the image hoster http://www.imagebam.com

Once again, I'm not a pro in Proxo programming, please correct me if it can be refined.
Code:
Name = "www.imagebam.com Direct Image - TEST 20090901 - Tpy"
Active = TRUE
URL = "$TYPE(htm)www.imagebam.com/image/*"
Limit = 15000
Match = "*<img id="the_image"*src=($AV(*sec*))\1 *>"
Replace = "<html>\r\n"
          "<head>\r\n"
          "</head>\r\n"
          "<body>\r\n"
          "<img src=\1>\r\n"
          "</body>\r\n"
          "</html>"
          "\k"
Example
[Image: 9e87f146902551.gif]

Add Thank You Quote this message in a reply
Sep. 01, 2009, 11:44 AM
Post: #2
RE: imagebam.com - Direct Image
To avoid problems with byte limit we can use a javascript redirection to the image but in this case i don't like how my filter work because the image isn't send with the good mime type from the server, so the browser download it like a file instead of showing it inline.

Code:
[Patterns]
Name = "www.imagebam.com Direct Image - TEST"
Active = TRUE
URL = "$TYPE(htm)www.imagebam.com/image/*"
Limit = 400
Match = "<img id="the_image"*src=($AV(*sec*))\1 *>"
Replace = "</html>"
          "<script>location.replace(\1);</script>"
          "\k"

The code used is imported from this other filter:
Code:
[Patterns]
Name = "<util> LimitWords. Block a site with these words {ln,sidki}ยท090219"
Active = FALSE
Limit = 30
Match = "(word1|word2|word3...)"
        "$SET(limitWords=$GET(limitWords)1)"
        "$TST(limitWords=11)"
Replace = "</xmp></textarea></noscript></script></object></embed></iframe>"
          "<script>location.replace("http://local.ptron/killed.html");</script>"
          "\k"
Add Thank You Quote this message in a reply
Nov. 07, 2009, 05:56 PM
Post: #3
RE: imagebam.com - Direct Image
gDay
Im new to this and will never be able to learn regular expressions but Ive been loving this app and not just for the ad blocking but for stuff like this (direct image links).
I dont go to this site or anything but I like having these in the pocket.
It bugged me the way it downloaded the image and not show it so I had a look at how to fix it....

[HTTP headers]
In = TRUE
Out = FALSE
Key = "Content-Disposition: imagebamfix (in)"
URL = "*.imagebam.com/dl.php?*"
Match = "attachment;*\1"
Replace = "\1"

...that will make it show in the browser and save with a proper name.

Thanx to everyone who keeps this amazing app going.
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: