Remove .*bot.* and .*crawl.* from awstats_data
This commit is contained in:
parent
adc04bf753
commit
44c76007cd
File diff suppressed because one or more lines are too long
|
@ -30,6 +30,29 @@ sub dumpList {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub dumpRobotList {
|
||||||
|
my @list = @{$_[0]};
|
||||||
|
my $FIC = $_[1];
|
||||||
|
my $first = $_[2];
|
||||||
|
|
||||||
|
foreach $r (@list)
|
||||||
|
{
|
||||||
|
next if ($r =~ /.*[Bb]ot.*/);
|
||||||
|
next if ($r =~ /.*[Cc]rawl.*/);
|
||||||
|
$r =~ s/\'/\\\'/g;
|
||||||
|
|
||||||
|
if ($first == 0)
|
||||||
|
{
|
||||||
|
print $FIC ", ";
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$first = 0;
|
||||||
|
}
|
||||||
|
print $FIC "'$r'";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sub dumpHash {
|
sub dumpHash {
|
||||||
my %hash = %{$_[0]};
|
my %hash = %{$_[0]};
|
||||||
my $FIC = $_[1];
|
my $FIC = $_[1];
|
||||||
|
@ -57,8 +80,8 @@ open($FIC,">", "awstats_data.py") or die $!;
|
||||||
print $FIC "#This file was automatically generated by iwla_convert.pl. Do not edit manually.\n\n";
|
print $FIC "#This file was automatically generated by iwla_convert.pl. Do not edit manually.\n\n";
|
||||||
|
|
||||||
print $FIC "robots = [";
|
print $FIC "robots = [";
|
||||||
dumpList(\@RobotsSearchIDOrder_list1, $FIC, 1);
|
dumpRobotList(\@RobotsSearchIDOrder_list1, $FIC, 1);
|
||||||
dumpList(\@RobotsSearchIDOrder_list2, $FIC, (@RobotsSearchIDOrder_list1 == 0) ? 1 : 0);
|
dumpRobotList(\@RobotsSearchIDOrder_list2, $FIC, (@RobotsSearchIDOrder_list1 == 0) ? 1 : 0);
|
||||||
print $FIC "]\n\n";
|
print $FIC "]\n\n";
|
||||||
|
|
||||||
print $FIC "search_engines = [";
|
print $FIC "search_engines = [";
|
||||||
|
|
Loading…
Reference in New Issue
Block a user