# $Id: BitRoad 11549 2010-06-05 15:03:39Z 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.

# BROKEN: There is no "free service" anymore

name: BitRoad
short: BR
web: "http://bitroad.net/"
tos: "http://bitroad.net/page/terms.php"
uri: qr{bitroad\.net/}
status: NON_FREE 2010-06-05

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
