# $Id: BitRoad 10871 2009-10-27 11:36:04Z sparky $
# Get::BitRoad - 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: BitRoad
short: BR
uri: qr{bitroad\.net/}
status: OK 2009-10-22

start:
	GET( $-{_uri} );

	ERROR( "file not found" )
		if /The requested file is not found/;

	m#<div class="content_text"><h1>(.*?)\s*\[ ($STDSIZE) \]</h1>#;
	INFO( name => $1, asize => $2 );

	RESTART( - irand( 60, 300 ), "free limit reached" )
		if /Downloading is in process from your IP-Address/;

	$-{form} = $self->form( match => { action => qr{^/download3\.php$} } );
	CLICK_DOWNLOAD( $-{form}->post() );

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