# $Id: UpFile 10867 2009-10-26 22:47:10Z sparky $
# Get::UpFile - File getter plugin for rsget.pl
#
# 2009 (c) Przemysław Iskra <sparky@pld-linux.org>
#		This program is free software,
# you may distribute it under GPL v2 or newer.

name: UpFile
short: UF
uri: qr{up-file\.com/download/}
cookie: uf
status: OK 2009-10-22

start:
	GET( $-{_uri} );

	ERROR( "file not found" )
		if m{<h1>The requested file is not found</h1>};

	! my $info = $self->form( match => { action => qr{^/sms/check2.php$} } );
	INFO( name => $info->get( "realname" ), size => $info->get( "sssize" ) );
	
	MULTI( "multi-download or free limit reached" )
		if /Downloading is in process from your IP-Address/;

	! my $form = $self->form( id => "Premium" );
	! $form->select( free => 0 );

	CLICK_DOWNLOAD( $form->post() );

# vim: filetype=perl:ts=4:sw=4
