in reply to Re: How to handle javascript
in thread How to handle javascript

How can a proxy be set with those clones?

Replies are listed 'Best First'.
Re^3: How to handle javascript
by shmem (Chancellor) on Jan 28, 2007 at 01:07 UTC
    AFAIK those clones honour the http_proxy environment variable, e.g. on UNIX (sh, bash,...):
    $ export http_proxy=http://proxy.example.com:3128/ $ perl myclonescript.pl

    then the "clone" in the myclonescript.pl will connect any site through proxy.example.com.

    Or set it inside the script:

    BEGIN { $ENV{http_proxy} = 'http://proxy.example.com:3128/'; } use WWW::Mechanize ...

    Note that the environment variable must be set before any "clone" module is loaded.

    --shmem

    _($_=" "x(1<<5)."?\n".q·/)Oo.  G°\        /
                                  /\_¯/(q    /
    ----------------------------  \__(m.====·.(_("always off the crowd"))."·
    ");sub _{s./.($e="'Itrs `mnsgdq Gdbj O`qkdq")=~y/"-y/#-z/;$e.e && print}
Re^3: How to handle javascript
by Cody Pendant (Prior) on Mar 19, 2007 at 03:46 UTC
    Mechanize uses LWP::UserAgent, so you can set proxies the same way.


    ($_='kkvvttuu bbooppuuiiffss qqffssmm iibbddllffss')
    =~y~b-v~a-z~s; print