Post Reply 
imageposter.com: Direct Image
Aug. 24, 2009, 11:28 PM (This post was last modified: Aug. 25, 2009 05:17 AM by Toppy.)
Post: #1
imageposter.com: Direct Image
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.
Add Thank You Quote this message in a reply
Aug. 25, 2009, 03:29 AM
Post: #2
RE: imageposter.com: Direct Image
Doubt that it matters but should the Replace begin with
"</script>\r\n"
?

I think dates and/or version numbers are good things. Wink
Add Thank You Quote this message in a reply
Aug. 25, 2009, 05:10 AM (This post was last modified: Aug. 25, 2009 05:16 AM by Toppy.)
Post: #3
RE: imageposter.com: Direct Image
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
Add Thank You Quote this message in a reply
Aug. 25, 2009, 07:57 PM (This post was last modified: Aug. 25, 2009 07:58 PM by JJoe.)
Post: #4
RE: imageposter.com: Direct Image
(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
Add Thank You Quote this message in a reply
Post Reply 


Forum Jump: