Menu

#1515 redirect google image direct link

3.0.19
closed
5
2012-10-19
2012-10-18
Anonymous
No

hi, i love your program
i would like to redirect the google image search link directly to the actual image

for example:
http://www.google.com.bo/imgres?imgurl=http://www.privoxy.org/user-manual/proxy_setup.jpg&imgrefurl=http://www.privoxy.org/user-manual/startup.html&usg=__Gjqx_ZoY9PxYOlx1aghV9gAjlIg=&h=453&w=575&sz=33&hl=es&start=5&zoom=1&tbnid=RgtXH7n0L_uGGM:&tbnh=106&tbnw=134&ei=45N_UMe7LoW6yAGQoYDYCg&itbs=1

directly to
http://www.privoxy.org/user-manual/proxy_setup.jpg

i've tried
{+redirect{https?://[\w-\.\/]+(\.jpg|\.jpeg|\.png|\.bmp)}}
.google./.*https?://[\w-\.\/]+(\.jpg|\.jpeg|\.png|\.bmp)

but doesn't work, im not very good with regexps, wold you help me, thanks
im running Privoxy 3.0.19 on windows xp

Discussion

  • Fabian Keil

    Fabian Keil - 2012-10-18
    • assigned_to: nobody --> fabiankeil
    • status: open --> pending
     
  • Anonymous

    Anonymous - 2012-10-18

    wow, that did the trick, thanks very much,
    keep up the good work.

    i more thing, wold you explain me what @, s and $ mean in the redirect entry
    i don't get it and can't find it anywere in the manual
    thanks in advance.

     
  • Fabian Keil

    Fabian Keil - 2012-10-19

    You're welcome.

    The relevant documentation is:
    http://www.privoxy.org/user-manual/actions-file.html#REDIRECT
    which documents that the redirect{} action takes either an URL or a pcrs command as parameter.

    Details on pcrs commands can be found in the filter file documentation as filters use pcrs commands as well.
    http://www.privoxy.org/user-manual/filter-file.html#AEN5060
    (I'll add a link to it.)

    In short: the s marks the beginning of the pcrs command, the @ is the delimiter used to tell the regular expression from the substitution and the $1 specifies that the whole text matched with the regular expression should be substituted with the text matched by (http://.*).

    When experimenting with redirects, it usually helps to enable redirect debugging:
    http://config.privoxy.org/user-manual/config.html#DEBUG

     
  • Fabian Keil

    Fabian Keil - 2012-10-19
    • status: open --> closed
     

Log in to post a comment.