B
bhabs
Hi,
I wrote a small LWP based perl program to search the air fare from a
travel website using POST.
#!/usr/bin/perl
use strict;
use CGI;
use LWP;
my $web_browser = LWP::UserAgent->new();
push @{ $web_browser->requests_redirectable }, 'POST';
$web_browser->timeout(300);
my $web_response = ();
$web_response = $web_browser->post('http://blabla.com/travel/
InitialSearch.do',
[
'fromCity' =>
'SFO',
'toCIty'
=> 'CVG'
.... #the rest
of the fields occur here
],
);
die "Error: ", $web_response->status_line()
unless $web_response->is_success;
my @content = $web_response->content;
print "@content";
When I print the content, I see the "intermediate" wait page (where it
displays the progress bar using javascript.... => I matched the
content with the "view source" from IExplorer)
I am unable to capture the final air fare page. It takes time for the
website to do the search and then display the air fare result page.
How do I make my program wait for the actual result and not grab the
intermediate response.
Could anyone please help me on this?
Regards,
bhabs
I wrote a small LWP based perl program to search the air fare from a
travel website using POST.
#!/usr/bin/perl
use strict;
use CGI;
use LWP;
my $web_browser = LWP::UserAgent->new();
push @{ $web_browser->requests_redirectable }, 'POST';
$web_browser->timeout(300);
my $web_response = ();
$web_response = $web_browser->post('http://blabla.com/travel/
InitialSearch.do',
[
'fromCity' =>
'SFO',
'toCIty'
=> 'CVG'
.... #the rest
of the fields occur here
],
);
die "Error: ", $web_response->status_line()
unless $web_response->is_success;
my @content = $web_response->content;
print "@content";
When I print the content, I see the "intermediate" wait page (where it
displays the progress bar using javascript.... => I matched the
content with the "view source" from IExplorer)
I am unable to capture the final air fare page. It takes time for the
website to do the search and then display the air fare result page.
How do I make my program wait for the actual result and not grab the
intermediate response.
Could anyone please help me on this?
Regards,
bhabs