[prev in list] [next in list] [prev in thread] [next in thread] 

List:       perl-win32-web
Subject:    RE: How to down load a page from web site which is expecting a browser supporting Frame
From:       "\(William\) Wenjie Wang" <williamw () aurema ! com>
Date:       2003-02-12 0:25:47
[Download RAW message or body]

Hi Chris,


Just realized that there is a frame tag being downloaded after examine the
downloaded html file.  Now, I now what to do next.  I'm going to add a
noframe redirect to my LWP download sub, in addition to the existing normal
"redirect".


Regards,
Wang

>-----Original Message-----
>From: Gerber, Christopher J [mailto:Christopher.J.Gerber@pfizer.com]
>Sent: Wednesday, 12 February 2003 10:29 AM
>To: '(William) Wenjie Wang'; perl-win32-web@listserv.ActiveState.com
>Subject: RE: How to down load a page from web site which is expecting a
>browser supporting Frame
>
>
>> -----Original Message-----
>> From: (William) Wenjie Wang [mailto:williamw@aurema.com]
>> Sent: Tuesday, February 11, 2003 6:05 PM
>>
>> 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
>>
>
>WWang,
>
>The basic problem is that when a page is using frames, the host
>document for
>the frames simply lists the subdocuments and how to lay them out.  You'll
>probably need to parse the HTML and then load each of the subdocuments.
>I've never used LWP or a Perl HTML parser, so I'll have to skip
>the example.
>Basically you want to look for <frame ...
>src="some/relative/url/path" ... >
>and pull out the src tag.  I wish I had some better details for you, but I
>don't... :)
>
>Chris
>
>
>LEGAL NOTICE
>Unless expressly stated otherwise, this message is confidential
>and may be privileged. It is intended for the addressee(s) only.
>Access to this E-mail by anyone else is unauthorized. If you are
>not an addressee, any disclosure or copying of the contents of
>this E-mail or any action taken (or not taken) in reliance on it
>is unauthorized and may be unlawful. If you are not an addressee,
>please inform the sender immediately.
>

_______________________________________________
Perl-Win32-Web mailing list
Perl-Win32-Web@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic