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:

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title> Ingram Micro AU</title>
</head>
<SCRIPT LANGUAGE="JavaScript">
if (top.location != location) top.location.href = location.href;
</SCRIPT>
<frameset framespaceing ="0" boder = "0" rows = "100, *" frameborder ="NO">
<frame name = "header" scrolling = "no" noresize target = "main" src="/AU/corporate/jsp/navbar/c_headernavbar.jsp?printMarkup=n">
<frame name="main" src="/corporate/PageFinder.jsp?pageID=&pagePath=
/corporate/content" marginwidth="0" marginheight="0" scrolling="auto" noresize target="_self">
<noframes>
<body bgcolor="#FFFFFF" topmargin="0">
<p>This page uses frames, but your browser doesn't support them.</p>
</body>
</noframes>
</frameset>
</html>

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.

-john von essen


On Tuesday, February 11, 2003, at 06:06 PM, ((William)) Wenjie Wang wrote:

Greetings,

I've been successfully downloading web pages using LWP::UserAgent without
any problem till I meet "http://www.ingrammicro.com.au";. All I could get is
a complaint from the web server that my browser doesn't support frame :( It
says:

<p>This page uses frames, but your browser doesn't support them.</p>

I've present my user agent is "Mozilla/4.0 (compatible; MSIE 6.0; Win32)"
,
but I'm still couldn't get away from it. Following is my code snip:
-----------------------------------8<-------------------------
my $myUserAgent = LWP::UserAgent->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';
my $myRequest = new HTTP::Request 'GET', $PageURL);
$myResponse = $myUserAgent->request($myRequest);
-----------------------------------8<-------------------------

I would like to know how to deal with this kind of situation? Any
suggestion is much appreciated.


TIA

WWang




Reply via email to