in reply to Re: Handling Javascript with LWP::UserAgent
in thread Handling Javascript with LWP::UserAgent

I have been able to retrieve pages with Javascript in the past. What's different now?
  • Comment on Re^2: Handling Javascript with LWP::UserAgent

Replies are listed 'Best First'.
Re^3: Handling Javascript with LWP::UserAgent
by Joost (Canon) on Jul 09, 2006 at 15:32 UTC
Re^3: Handling Javascript with LWP::UserAgent
by jeffa (Bishop) on Jul 09, 2006 at 15:32 UTC

    Since you do not tell us what those past pages looked like (in terms of Javascript), how could we possibly tell you what has changed? We can guess -- perhaps those pages you speak of did not use Javascript for navigational purposes. You could try the Javascript CPAN module. I used this successfully several years ago to decrypt an encrypted web page, but something tells me you might need to parse out the href locations yourself and feed those back to LWP.

    jeffa

    L-LL-L--L-LL-L--L-LL-L--
    -R--R-RR-R--R-RR-R--R-RR
    B--B--B--B--B--B--B--B--
    H---H---H---H---H---H---
    (the triplet paradiddle with high-hat)
    
      Since JavaScript doesn't include a Browser Object Model, pages that rely on browser objects (window, document, history, etc.) don't work with it, so your script doesn't really demonstrate a solution using that module with LWP::UserAgent to handle pages with JavaScript.