in reply to Re: Re: Re: LWP & Javascript
in thread LWP & Javascript

I'm going to show my ignorance here so please bear with me. How would I execute said Javascript using LWP::*?

Thanks.

Replies are listed 'Best First'.
Re: Re: Re: Re: Re: LWP & Javascript
by dws (Chancellor) on Jul 25, 2002 at 06:57 UTC
    How would I execute said Javascript using LWP::*?

    You wouldn't. That's why I'm suggesting that you reverse engineer what's doing on in the page. Once you understand what the Javascript detection mechanism is, you can work around it (via some clever regexs, or whatever) without having to simulate Javascript execution.

Re: LWP & Javascript
by hacker (Priest) on Jul 25, 2002 at 06:58 UTC
    You can't. HTML is parsed, Javascript is executed.

    LWP does not contain any Javascript engine that I'm aware of. You might try using pavuk though, which does support Javascript, IIRC.

Re5: LWP & Javascript
by belg4mit (Prior) on Jul 28, 2002 at 23:58 UTC
    Not with LWP. But you can with JavaScript. OTOH if this cookie setting bit is the problem you'd be better off just parsing the JavaScript in your code; you don't actually want to *execute* JavaScript, just emulate it's results.

    --
    perl -pew "s/\b;([mnst])/'$1/g"