SVN: toys/rsget.pl/Get/DepositFiles

sparky sparky at pld-linux.org
Wed Mar 2 21:34:19 CET 2011


Author: sparky
Date: Wed Mar  2 21:34:18 2011
New Revision: 12176

Modified:
   toys/rsget.pl/Get/DepositFiles
Log:
- fixed / updated


Modified: toys/rsget.pl/Get/DepositFiles
==============================================================================
--- toys/rsget.pl/Get/DepositFiles	(original)
+++ toys/rsget.pl/Get/DepositFiles	Wed Mar  2 21:34:18 2011
@@ -1,7 +1,7 @@
 # $Id$
 # Get::DepositFiles - File getter plugin for rsget.pl
 #
-# 2009-2010 (c) Przemysław Iskra <sparky at pld-linux.org>
+# 2009-2011 (c) Przemysław Iskra <sparky at pld-linux.org>
 #		This program is free software,
 # you may distribute it under GPL v2 or newer.
 
@@ -9,7 +9,7 @@
 short: DF
 web: "http://depositfiles.com/"
 uri: qr{depositfiles\.com/(../)?files/[0-9a-z]+}
-status: OK 2010-07-13
+status: OK 2011-03-02
 
 unify:
 	return "http://depositfiles.com/files/$1" if m#/files/([0-9a-z]+)#;
@@ -29,16 +29,26 @@
 	$-{dl_form} = $self->form( match => { onsubmit => qr/^download_started/ } );
 	GOTO stage_download if $-{dl_form};
 
-	! my $form = $self->form( match => { body => qr/name="gateway_result"/ } );
+	! my $form = $self->form( match => { onsubmit => qr/^show_begin_popup/ } );
 	CLICK( $form->post() );
 
 	RESTART( $1, "free limit reached" )
 		if m#<span class="html_download_api-limit_interval">(\d+)</span>#;
 	
 	MULTI() if m#<span class="html_download_api-limit_parallel">#;
-	$-{dl_form} = $self->form( match => { onsubmit => qr/^download_started/ } );
 	
-	WAIT( 60, "starting download" );
+	! m#setTimeout\('load_form\(\)', (\d+)\);#;
+	my $wait = $1 / 1000;
+
+	! m/\$\('#download_container'\)\.load\('(.*?)'\);/;
+	$-{dl_link} = $1;
+
+	WAIT( $wait, "starting download" );
+
+	CLICK( $-{dl_link} );
+
+	$-{dl_form} = $self->form( match => { onsubmit => qr/^download_started/ } );
+	GOTO stage_download if $-{dl_form};
 
 stage_download:
 	CLICK_DOWNLOAD( $-{dl_form}->post() );


More information about the pld-cvs-commit mailing list