Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to use WWW::Scripter to get a web page with Javascript in it and using the following code look at the HTML.

my $url = 'http://www.whatever.whatever'; my $mechObject = new WWW::Scripter; $mechObject->use_plugin('JavaScript'); $mechObject->get( $url ); print $mechObject -> content;

This seems to follow the example at CPAN but prints out the javascript. As a perl appprentice coder of not much knowledge can someone point me in the right direction please.

Replies are listed 'Best First'.
Re: Trying to view HTML created from JavaScript web page
by Anonymous Monk on Apr 18, 2012 at 15:27 UTC
    I am unable to reproduce the problem. You left out important information.

      What extra info would you like?

Re: Trying to view HTML created from JavaScript web page
by Anonymous Monk on Apr 19, 2012 at 04:10 UTC

    content is not a DOM method, you need to use the DOM

      Yes, that seems good advice but with my limited knowledge of perl I could do with a pointer to some site to explain this, or an example bit of code. The whole processed page is what I am after with all javascript converted to html.

        Well WWW::Scripter's content already uses the DOM, so if that was going to work, it would have worked already