Author: sparky
Date: Fri Dec 11 21:56:39 2009
New Revision: 11029

Modified:
   toys/rsget.pl/Get/HotFile
Log:
- updated for captcha change, now uses recaptcha, no automatic solver
  because recaptcha is to hard


Modified: toys/rsget.pl/Get/HotFile
==============================================================================
--- toys/rsget.pl/Get/HotFile   (original)
+++ toys/rsget.pl/Get/HotFile   Fri Dec 11 21:56:39 2009
@@ -9,8 +9,8 @@
 short: HF
 web: "http://hotfile.com/";
 tos: "http://hotfile.com/terms-of-service.html";
-uri: qr{hotfile\.com/}
-status: OK 2009-10-22
+uri: qr{hotfile\.com/dl/\d+/[0-9a-f]+/.+}
+status: OK 2009-12-11
 
 start:
        GET( $-{_uri} );
@@ -38,18 +38,23 @@
 
        GOTO stage_download if m#<a href="(.*?)">Click here to download</a>#;
 
-       ! $-{capform} = $self->form( match => { body => qr/Enter word above/ } 
);
+       ! $-{capform} = $self->form( match => { body => qr/recaptcha\.net/ } );
+
+       ! m{ src="(http://api\.recaptcha\.net/challenge.*)"};
 
-       ! m#<img src="(/captcha\.php.*?)">#;
        GET( $1, keep_referer => 1 );
 
+       ! m{challenge : '(\S+)',};
+       $-{capform}->set( recaptcha_challenge_field => $1 );
+
+       GET( "http://api.recaptcha.net/image?c="; . $1, keep_referer => 1 );
+
        CAPTCHA(
-               qr/[a-zA-Z]{5,6}/,
-               process => \&hf_decaptcha
+               qr/\S+ \S+/
        );
 
        GOTO stage_getcaptcha unless defined $_;
-       $-{capform}->set( captcha => $_ );
+       $-{capform}->set( recaptcha_response_field => $_ );
 
        GET( $-{capform}->post() );
 stage_download:
@@ -63,20 +68,4 @@
 
        CLICK_DOWNLOAD( $1 );
 
-perl:
-
-sub hf_color_select_lowest
-{
-       my @s = sort { $a <=> $b } @_;
-       return $s[0];
-}
-
-sub hf_decaptcha
-{
-       my $img = shift;
-       $img->color_filter( \&hf_color_select_lowest );
-       $img->luma_emphasize( 90, 130 );
-       return $img->ocr();
-}
-
 # vim: filetype=perl:ts=4:sw=4
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to