line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Duadua::Parser::Bot::YahooJapanBot; |
2
|
6
|
|
|
6
|
|
49
|
use strict; |
|
6
|
|
|
|
|
54
|
|
|
6
|
|
|
|
|
180
|
|
3
|
6
|
|
|
6
|
|
81
|
use warnings; |
|
6
|
|
|
|
|
13
|
|
|
6
|
|
|
|
|
1133
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub try { |
6
|
93
|
|
|
93
|
1
|
206
|
my ($class, $d) = @_; |
7
|
|
|
|
|
|
|
|
8
|
93
|
100
|
|
|
|
180
|
if ( index($d->ua, 'http://help.yahoo.co.jp/help') > -1 ) { |
9
|
|
|
|
|
|
|
return { |
10
|
1
|
|
|
|
|
11
|
name => 'Yahoo!Japan Crawler', |
11
|
|
|
|
|
|
|
is_bot => 1, |
12
|
|
|
|
|
|
|
}; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
|
15
|
92
|
100
|
66
|
|
|
252
|
if ( index($d->ua, 'Y!J-') > -1 && $d->ua =~ m|Y!J-[A-Z]+| ) { |
16
|
2
|
|
|
|
|
14
|
my $h = { |
17
|
|
|
|
|
|
|
name => 'Yahoo!Japan Crawler', |
18
|
|
|
|
|
|
|
is_bot => 1, |
19
|
|
|
|
|
|
|
}; |
20
|
2
|
100
|
|
|
|
11
|
if ($d->opt_version) { |
21
|
1
|
|
|
|
|
13
|
my ($version) = ($d->ua =~ m!/([\d.]+)!); |
22
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
|
25
|
2
|
|
|
|
|
9
|
return $h; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
1; |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
__END__ |