in reply to Can a whole web page be saved using Perl?

Please post code that demonstrates this problem or it didn't happen :)

This works for me

# this is what $agent->content does print "outerHTML \n\n", $agent->Document->documentElement->{outerHTML},"\n"; # this returns same content print "innerHTML \n\n", $agent->Document->documentElement->{innerHTML},"\n";

Replies are listed 'Best First'.
Re^2: Can a whole web page be saved using Perl?
by eshwar (Novice) on Aug 15, 2009 at 04:30 UTC
    Sorry for the late reply. Was tied up with other things. I cant use the WWW::Mechanize because it does not allow javascript execution and the $ie->content() returns me the following

    <HTML><HEAD><LINK rel=stylesheet href="c1.css"></HEAD></HTML>

    Sorry for my ignorance but does'nt the below code need a LWP package rather than Win32::IE::Mechanize?

    $agent->Document->documentElement->{innerHTML}

    Thanks,
    Eshwar
      That is not code that demonstrates your problem. content works as advertised for me.
      my $ie = Win32::IE::Mechanize->new ... my $agent = $ie->agent;