Beefy Boxes and Bandwidth Generously Provided by pair Networks
There's more than one way to do things
 
PerlMonks  

Re: LWP::UserAgent::FramesReady;

by holo (Monk)
on Dec 09, 2003 at 18:24 UTC ( [id://313471]=note: print w/replies, xml ) Need Help??


in reply to LWP::UserAgent::FramesReady;

First of all, you should use LWP::UserAgent::FramesReady not LWP::UserAgent to construct the $ua.

my $ua = new LWP::UserAgent::FramesReady;

The result is not an HTTP::Response instance, rather a more appropriate HTTP::Response::Tree object since more than one page is fetched (The main page, the frames, sub-frames, etc...). It's pretty straight forward to get all the responses out with @responses = $response_tree->children();.

Replies are listed 'Best First'.
Re: Re: LWP::UserAgent::FramesReady;
by shockme (Chaplain) on Dec 09, 2003 at 19:45 UTC
    Wow. I guess the documentation is wrong:
    SYNOPSIS use LWP::UserAgent::FramesReady; $ua = new LWP::UserAgent; $response = $ua->request($http_request);

    But you are correct. It's working great now. Thanks!

    If things get any worse, I'll have to ask you to stop helping me.

      Please consider submitting a documentation patch, or at least letting Alan E Derhaag know about this.

      ciao ciao!

      -nuffin
      zz zZ Z Z #!perl
        Bug #4634 has been submmitted.

        If things get any worse, I'll have to ask you to stop helping me.

        Hi there, I'm also facing the same problem as the topic stater.
        When I add two line like suggested above

        @responses = $response_tree->children();
        print @responses;


        I get the folowing error:
        \Global symbol "@responses" requires explicit package name at ./test_grep.pl line 20.
        Global symbol "$response_tree" requires explicit package name at ./test_grep.pl line 20.
        Global symbol "@responses" requires explicit package name at ./test_grep.pl line 21.
        Execution of ./test_grep.pl aborted due to compilation errors.

        Which package name should I use?

        When I print $response->content;
        I also get the response that my browser doesn't support frames....
        the URL is http://www.dewestonline.cq-link.sr/

        Thanks in advance
        Albert

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://313471]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having a coffee break in the Monastery: (5)
As of 2024-04-19 22:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found