The Un-Official Proxomitron Forum
imageposter.com: Direct Image - Printable Version

+- The Un-Official Proxomitron Forum (https://www.prxbx.com/forums)
+-- Forum: Proxomitron Filters (/forumdisplay.php?fid=38)
+--- Forum: Website Customization (/forumdisplay.php?fid=9)
+--- Thread: imageposter.com: Direct Image (/showthread.php?tid=1467)



imageposter.com: Direct Image - Toppy - Aug. 24, 2009 11:28 PM

Direct link to image on www.imageposter.com

Code is far from optimal, please forgive me for that.
Code:
[Patterns]
Name = "www.imageposter.com Direct Image - TEST 20090825 - Tpy"
Active = TRUE
URL = "www.imageposter.com/uploads/get/([0-9]+)"
Bounds = "<script*</script>"
Limit = 1400
Match = "*document.write\('<img id=\"imagefile\" src=\"(http://www.imageposter.com/storage/([0-9]+)/*)\1\" align=\"center\" /><br clear=\"all\" />'\);*"
Replace = "<script>document.location="\1"; </script>"

Example
[Image: 17736video_files_comparison.png]

EDIT: Updated with JJoe's suggestions.


RE: imageposter.com: Direct Image - JJoe - Aug. 25, 2009 03:29 AM

Doubt that it matters but should the Replace begin with
"</script>\r\n"
?

I think dates and/or version numbers are good things. Wink


RE: imageposter.com: Direct Image - Toppy - Aug. 25, 2009 05:10 AM

Indeed, why did I close the script tag, so the unnecessary script elements got executed.
I'll add the date, with my current knowledge I'm not able to refine it though.Wink


RE: imageposter.com: Direct Image - JJoe - Aug. 25, 2009 07:57 PM

(Aug. 25, 2009 05:10 AM)Toppy Wrote:  Indeed, why did I close the script tag, so the unnecessary script elements got executed.

I thought you added one that you didn't need...
Your Bounds match is
<script*</script>
but your Replace was
</script><script*</script>

(Aug. 25, 2009 05:10 AM)Toppy Wrote:  I'll add the date, with my current knowledge I'm not able to refine it though.Wink

I might do something like

Code:
[Patterns]
Name = "www.imageposter.com Direct Image - TEST2 20090825 - Tpy"
Active = TRUE
URL = "$TYPE(htm)www.imageposter.com/uploads/get/([0-9]+)"
Limit = 3000
Match = "*document.write[^)]++"
        "src=$AV(http://www.imageposter.com/storage/([0-9]+)/&\1)"
Replace = "<html>\r\n"
          "<head>\r\n"
          "</head>\r\n"
          "<body>\r\n"
          "<script>document.location="\1"; </script>\r\n"
          "</body>\r\n"
          "</html>"
          "\k"

HTH