#!/usr/bin/perl

name: BitRoad
short: BR
uri: qr{bitroad\.net/}
status: OK 2009-09-12

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( -(60 + int rand 300), "free limit reached" )
		if /Downloading is in process from your IP-Address/;

	! s#^.*<form action="/download3\.php".*?>##s;
	! m#<input type="hidden" name="uid" value="(.*?)" />#;
	DOWNLOAD( "/download3.php", post => { uid => $1, free => "Download" } );

# vim:ts=4:sw=4
