# $Id: BitRoad 11249 2010-03-11 17:29:47Z sparky $
# Get::BitRoad - 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: BitRoad
short: BR
web: "http://bitroad.net/"
tos: "http://bitroad.net/page/terms.php"
uri: qr{bitroad\.net/}
status: OK 2010-03-11

start:
	GET( $-{_uri} );

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

	m#<div class="content_text">\s*<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
