Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi, I am using $mech->get($url); to get the contents of a link. But that link seems to send the following message first: "Please wait.. the page is loading". So as soon as the the message is returned the mech object stops. Any idea of how to make $mech wait till the full page is loaded. Thanks Hemanth
  • Comment on wait till the page is loaded www::mechanize

Replies are listed 'Best First'.
Re: wait till the page is loaded www::mechanize
by ikegami (Patriarch) on Jul 20, 2005 at 03:56 UTC
    The result probably has a Refresh header or http-refresh meta tag. Extract it and perform as directed.
      Thank you. As you said the page was sending a refresh header with another URL.
Re: wait till the page is loaded www::mechanize
by gube (Parson) on Jul 20, 2005 at 03:59 UTC

    Hi try this,

    use strict; use WWW::Mechanize; my $mech = WWW::Mechanize->new( autocheck => 1 ); $mech->get( 'https://adwords.google.com/select/TrafficEstimatorSandbox +' ); $mech->success() || die"$mech->status()"; print $mech->content;

      Hi gube,

      I am getting error message

      Error GETing https://adwords.google.com/select/TrafficEstimatorSandbox +%0A+: Protocol scheme 'https' is not supported (Crypt::SSLeay not ins +talled) at page.pl line 7