SVN: toys/rsget.pl/Get/FileServe
sparky
sparky at pld-linux.org
Fri Mar 4 18:30:10 CET 2011
Author: sparky
Date: Fri Mar 4 18:30:09 2011
New Revision: 12189
Modified:
toys/rsget.pl/Get/FileServe
Log:
- more fixes
Modified: toys/rsget.pl/Get/FileServe
==============================================================================
--- toys/rsget.pl/Get/FileServe (original)
+++ toys/rsget.pl/Get/FileServe Fri Mar 4 18:30:09 2011
@@ -36,13 +36,13 @@
! m{src="(/landing/.+?/download_captcha\.js)"};
$-{captcha_uri} = $1;
- CLICK( "", post => { checkDownload => "check" } );
+ CLICK( "", post => { checkDownload => "check" }, keep_referer => 1 );
MULTI() if /{"fail":"parallelDownload"}/;
RESTART( 900, "free limit reached" ) if /{"fail":"timeLimit"}/;
ERROR( "some error: $_" ) if /{"fail"/;
- ERROR( "some error" ) unless /{"success":"showCaptcha"}/;
+ ! /{"success":"showCaptcha"}/;
GET( $-{captcha_uri}, keep_referer => 1,
headers => [ "X-Requested-With: XMLHttpRequest" ] );
@@ -68,16 +68,16 @@
recaptcha_challenge_field => $-{captcha_challenge},
}, keep_referer => 1 );
- if ( /incorrect-captcha-sol/ ) {
+ if ( /{"success":1}/ ) {
+ CAPTCHA_RESULT( "OK" );
+ } else {
CAPTCHA_RESULT( "FAIL" );
GOTO stage_getcaptcha;
- } else {
- CAPTCHA_RESULT( "OK" );
}
GET( "", post => { downloadLink => "wait" }, keep_referer => 1 );
- ! /(\d+)/;
+ ! /^\xef\xbb\xbf(\d+)$/s;
WAIT( -$1, "expecting download link" );
CLICK( "", post => { downloadLink => "show" }, keep_referer => 1, );
@@ -90,4 +90,10 @@
RESTART( 1, "download link expired" )
if /<li class="title">Your download link has expired/;
+ RESTART( 60, "captcha error, this shouldn't happen" )
+ if /<li class="title">Captcha error/;
+
+ RESTART( 1, "multi download not allowed" )
+ if m{URL=http://www\.fileserve\.com/landing-1403\.php};
+
# vim: filetype=perl:ts=4:sw=4
More information about the pld-cvs-commit
mailing list