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

Re: Need help with my code?

Thread Previous | Thread Next
From:
merlyn
Date:
March 16, 2001 11:09
Subject:
Re: Need help with my code?
Message ID:
m1vgp93514.fsf@halfdome.holdit.com
>>>>> "Cormac" == Cormac Garvey <a10coga@hstc.necsyl.com> writes:

Cormac>   I have run into another problem, the page I retrieved uses FRAMES, so 
Cormac>   all I see is
  
Cormac>   <frame src="
Cormac> /ftgw/webxpress/account_listings/1BD900013E21"
Cormac> " name="body" marginwidth=0 marginheight=0 scrolling=auto>

Cormac> I am using libwww 5.50, how can I see file 
Cormac> "/ftgw/webxpress/account_listings/1BD900013E21" ?

You need to resolve that URL against the "base" URL of your response.
Luckily, $response->base contains that. :)  And the URI module
lets you hack a relative URL rather painlessly:

    my $new_url = URI->new_abs(
      "/ftgw/webxpress/account_listings/1BD900013E21", $response->base);

Then fetch $new_url.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn@stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Perl/Unix/security consulting, Technical writing, Comedy, etc. etc.
See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!

Thread Previous | Thread Next


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