in reply to Re: Handling Javascript with LWP::UserAgent
in thread Handling Javascript with LWP::UserAgent
If you run this code you should get a response that has Javascripts. As you can see the code is basically the same except for the URL.#!/usr/bin/perl use strict; use LWP::UserAgent; { my $ua = new LWP::UserAgent(); my $search_address = "http://online.wsj.com/search/full.html?"; #creating the request object my $req = new HTTP::Request ('GET', $search_address); #sending the request my $res = $ua->request($req); if (!($res->is_success)){ warn "Warning:".$res->message."\n"; } my $response = $res->headers_as_string(); my $response .= $res->content(); print "$response\n"; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re^3: Handling Javascript with LWP::UserAgent
by Joost (Canon) on Jul 09, 2006 at 16:25 UTC | |
|
Re^3: Handling Javascript with LWP::UserAgent
by Ieronim (Friar) on Jul 09, 2006 at 16:30 UTC |