develooper Front page | perl.libwww | Postings from September 2001

Example of HTML::Form not working properly with some urls

From:
Andrea Tasso
Date:
September 22, 2001 07:32
Subject:
Example of HTML::Form not working properly with some urls
Message ID:
Pine.LNX.4.21.0109221629240.3053-100000@dragonII.thasso.net

Hello, if you try this


#!/usr/bin/perl

use HTTP::Cookies;
use HTML::Form;
use LWP;
use URI;
use LWP::Debug qw(+);

my $ua = LWP::UserAgent->new();
$ua->agent('Mozilla');

$url = "http://www.corriere.it/lavoro/personale/ricerannun.jhtml";
$req = HTTP::Request->new(GET => $url);
$res = $ua->request($req);
$html = $res->content;
$form = HTML::Form->parse($html,$url);
print $form->dump;


you get strange results (instead you get reasonable results, if you change
url, eg http://it.classifieds.yahoo.com or
http://patft.uspto.gov/netahtml/search-adv.htm).

With the url in the script you do not dump from the main form, but from
one at the left the side of the page.

Any suggestion ?

Thank you,

Andrea






nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About