Author: sparky
Date: Wed Oct 21 22:58:16 2009
New Revision: 10802

Modified:
   toys/rsget.pl/Get/EasyShare
Log:
- use form methods


Modified: toys/rsget.pl/Get/EasyShare
==============================================================================
--- toys/rsget.pl/Get/EasyShare (original)
+++ toys/rsget.pl/Get/EasyShare Wed Oct 21 22:58:16 2009
@@ -40,11 +40,7 @@
                WAIT_NEXT( stage_cappage, $2, "still expecting captcha" );
        }
 
-       ! s#.*<form class="captcha1" method="post" action="(.*?)">##;
-       $-{file_uri} = $1;
-
-       ! m#<input type="hidden" name="id" value="(\d+)">#;
-       $-{id} = $1;
+       ! $-{capform} = $self->form( match => { class => qr/^captcha1$/ } );
 
        ! m#<p class="pb0"><img src="(.*?)" width="220" height="50" alt="" 
border="1"></p>#;
        my $img = $1;
@@ -57,8 +53,9 @@
        );
 
        GOTO stage_cappage unless $_;
+       $-{capform}->set( captcha => $_ );
 
-       DOWNLOAD( $-{file_uri}, post => { captcha => $_, id => $-{id} } );
+       DOWNLOAD( $-{capform}->post() );
 
        if ( /Invalid characters/ ) {
                CAPTCHA_RESULT( "FAIL" );
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to