SVN: toys/rsget.pl/Get/FreakShare

sparky sparky at pld-linux.org
Tue Mar 2 03:27:07 CET 2010


Author: sparky
Date: Tue Mar  2 03:27:07 2010
New Revision: 11224

Modified:
   toys/rsget.pl/Get/FreakShare
Log:
- skip captcha if it isn't there


Modified: toys/rsget.pl/Get/FreakShare
==============================================================================
--- toys/rsget.pl/Get/FreakShare	(original)
+++ toys/rsget.pl/Get/FreakShare	Tue Mar  2 03:27:07 2010
@@ -32,7 +32,10 @@
 	CLICK( $-{form}->post() );
 
 stage_solvecaptcha:
-	! $-{capform} = $self->form( match => { body => qr/recaptcha\.net/ } );
+	unless ( $-{capform} = $self->form( match => { body => qr/recaptcha\.net/ } ) ) {
+		! $-{capform} = $self->form( match => { onsubmit => qr/^disableButton/ } );
+		GOTO stage_download;
+	}
 
 	! m{ src="(http://api\.recaptcha\.net/challenge.*)"};
 
@@ -50,12 +53,14 @@
 	GOTO stage_getcaptcha unless defined $_;
 	$-{capform}->set( recaptcha_response_field => $_ );
 
-	CLICK_DOWNLOAD( $-{capform}->post() );
 stage_download:
+	CLICK_DOWNLOAD( $-{capform}->post() );
 
-	if ( m#recaptcha# ) {
+	if ( m/recaptcha/ or /^bad try$/ ) {
 		CAPTCHA_RESULT( "FAIL" );
 		GOTO stage_solvecaptcha;
 	}
 
+	MULTI() if /Sorry, you cant download more then 1 files at time/;
+
 # vim: filetype=perl:ts=4:sw=4


More information about the pld-cvs-commit mailing list