This is really annoying I get the same issue when I run the script from
a Linux server as I do an a windows xp workstation.



> -----Original Message-----
> From: Paul Kraus [mailto:[EMAIL PROTECTED] 
> Sent: Tuesday, December 02, 2003 8:31 AM
> To: [EMAIL PROTECTED]
> Subject: Mechanize 500 connect failed
> 
> 
> We discussed this some in an earlier thread but I have yet to 
> resolve the issue. About 15% of them I run my script it will 
> fail with this error.
> 
> 500 Connect failed: Unknown error, Unknown Error at line ...
> 
> The script is sound as it runs fine the rest of the time.
> 
> I thought maybe its because the site is unstable but I get 
> the same issue with another script that does a similar thing 
> to another website.
> 
> I have wrapped my connect calls in while loops as a temporary 
> fix. However I plan to have this script run as a cron job and 
> the thought have it hanging has occurred. I could set it to 
> try only so many times but this is still just a work around 
> rather then a fix.
> 
> Here is one page call that goes to the login page.
> 
> TIA
> Paul 
> 
> sub login{
>   my ( $login, $password, $url ) = ( 'XXXXXX', 
> 'XXXXXXX','https://www.merchantconnect.com/merchant_tools/inde
> x.asp' );
>   my $statementurl = 
> 'https://www.merchantconnect.com/merchant_tools/statement_fund
ing/printr
ecent.asp?p1=undefined';

  # Continue to try and connect untill a connection is established.
  my $flag = 0;
  while ( $flag == 0 ){
    $merchant -> get ( $url ); 
    warn "Can't even get the login page: ", $merchant -> response ->
status_line unless $merchant -> success;
    $flag = 1 if ($merchant -> success );
  }
  $merchant -> field( 'uid', $login );
  $merchant -> field( 'pwd', $password );
  $merchant -> submit();
  die "Can't submit login form: ", $merchant -> response -> status_line
unless $merchant -> success;

  $merchant -> get ( $statementurl );
  die "Can't even get the statement page: ", $merchant -> response ->
status_line unless $merchant -> success; }


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to