# $Id: UpFile 11271 2010-03-13 02:41:55Z sparky $
# Get::UpFile - File getter plugin for rsget.pl
#
# 2009-2010 (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
web: "http://up-file.com/"
tos: "http://up-file.com/page/terms.php"
uri: qr{up-file\.com/download/\d{4}\.[0-9a-f]+}
cookie: uf
status: BROKEN 2010-03-12

# BROKEN Note: Page is blocked ? Download button is disabled in the "free"
# form.

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
