SVN: toys/rsget.pl/Get/EasyShare

sparky sparky at pld-linux.org
Thu Feb 25 21:30:50 CET 2010


Author: sparky
Date: Thu Feb 25 21:30:49 2010
New Revision: 11178

Modified:
   toys/rsget.pl/Get/EasyShare
Log:
- fix it my way


Modified: toys/rsget.pl/Get/EasyShare
==============================================================================
--- toys/rsget.pl/Get/EasyShare	(original)
+++ toys/rsget.pl/Get/EasyShare	Thu Feb 25 21:30:49 2010
@@ -49,21 +49,21 @@
 
 	! $-{capform} = $self->form( match => { class => qr/^captcha1$/ } );
 
-	if ( /<img src/ ) {
-	  ! m#<p class="pb0"><img src="(.*?)" width="220" height="50" alt="" border="1"></p>#;
-	  my $img = $1;
+	GOTO stage_download
+		unless m#<p class="pb0"><img src="(.*?)" width="220" height="50" alt="" border="1"></p>#;
+	my $img = $1;
 
-	  GET( $img, keep_referer => 1 );
+	GET( $img, keep_referer => 1 );
 
-	  CAPTCHA(
+	CAPTCHA(
 	  	qr/[2-9abcdeghkmnpqsuvxyz]{5,6}/,
 	  	process => \&es_decaptcha
-	  );
+	);
 
-	  GOTO stage_cappage unless defined $_;
-	  $-{capform}->set( captcha => $_ );
-    }
+	GOTO stage_cappage unless defined $_;
+	$-{capform}->set( captcha => $_ );
 
+stage_download:
 	DOWNLOAD( $-{capform}->post() );
 
 	if ( /Invalid characters/ ) {


More information about the pld-cvs-commit mailing list