#!/usr/bin/perl

# /root/zoozle/new-bots/emule-newsbot/TorrentNewsCrawler.pl

use IO::Handle;
require "/root/zoozle/new-bots/torrent-newsbot/functions.pl";


my $EmuleStoreFlatFile = "/root/zoozle/new-bots/emule_news.txt";
unlink $EmuleStoreFlatFile;

my %BotsDE = (
	"1" => 'saug.pl',
	"2" => 'titan.pl',
	"3" => 'eselfilme.pl',
	"4" => 'goldesel.pl',
	"5" => 'portal.pl',
#	"6" => '.pl',
#	"7" => '',
#	"8" => '',
);

my %BotsEN = (
	"1" => 'tv.pl',
#	"2" => 'share.pl',
	"3" => 'fuck.pl',
	"4" => 'reactor.pl',
#	"5" => '.pl',
#	"6" => 'a.pl',
#	"7" => '.pl',
#	"8" => '.pl',
#	"9" => '.pl',
#	"10" => '.pl',
#	"11" => '',
);


open(TORRENT,">$EmuleStoreFlatFile") or warn;
		TORRENT->autoflush(1);
		TORRENT->blocking(0);
		binmode TORRENT, ":utf8";
		flock(TORRENT, 2);

#while( my ($key,$val) = each(%BotsDE) ) {
#
#	my $Content = '';
#	$Content = `/usr/bin/perl /root/zoozle/new-bots/emule-newsbot/de/$val`;
#	print TORRENT "$Content\n";
#	
#}; # while

while( my ($key,$val) = each(%BotsEN) ) {

	my $Content = '';
	$Content = `/usr/bin/perl /root/zoozle/new-bots/emule-newsbot/en/$val`;
	print TORRENT "$Content\n";
	
}; # while

close TORRENT;

&AddContentToSqlEMULE($EmuleStoreFlatFile);


