Le mardi 11 f�vrier 2003 � 19:15, John Von Essen �crivait:
> To get the job, you might have to grab the individual frame src's directly.
>
> With LWP::UserAgent, the GET on www.ingrammicro.com.au/ should only return:
>
> To GET the real goods, you have to parse this page for the proper frame
> src, such as "http://...../corporate/PageFinder.jsp?pageID.....", then go
> and do a GET on that URL.
And if you are really lazy, as you should be, you can use
WWW::Mechanize, which extract_links() method is able to grab the links
in all the <A> and <FRAME> tags.
Or you could simply follow() the nth link:
use WWW::Mechanize;
use HTTP::Cookies;
my $myUserAgent = WWW::Mechanize->new();
$myUserAgent->agent("Mozilla/4.0 (compatible; MSIE 6.0; Win32)");
$myUserAgent->cookie_jar(HTTP::Cookies->new(autosave => 1));
local $PageURL = 'http://www.ingrammicro.com.au';
$myUserAgent->get($PageURL);
$myUserAgent->follow(0); # this is the first frame
print $myUserAgent->content;
--
Philippe "BooK" Bruhat
The faster the climb, the swifter the fall.
(Moral from Groo The Wanderer #87 (Epic))