line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Duadua::Parser::Bot::GooglebotMobile; |
2
|
6
|
|
|
6
|
|
723
|
use strict; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
157
|
|
3
|
6
|
|
|
6
|
|
24
|
use warnings; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
117
|
|
4
|
6
|
|
|
6
|
|
27
|
use Duadua::Util; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
1974
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub try { |
7
|
346
|
|
|
346
|
1
|
601
|
my ($class, $d) = @_; |
8
|
|
|
|
|
|
|
|
9
|
346
|
100
|
|
|
|
588
|
return unless index($d->ua, 'oogle') > -1; |
10
|
|
|
|
|
|
|
|
11
|
30
|
100
|
|
|
|
74
|
if ( index($d->ua, 'googleweblight') > -1 ) { |
12
|
1
|
|
|
|
|
5
|
my $h = { |
13
|
|
|
|
|
|
|
name => 'googleweblight', |
14
|
|
|
|
|
|
|
is_bot => 1, |
15
|
|
|
|
|
|
|
}; |
16
|
|
|
|
|
|
|
|
17
|
1
|
|
|
|
|
3
|
return Duadua::Util->set_os($d, $h); |
18
|
|
|
|
|
|
|
} |
19
|
|
|
|
|
|
|
|
20
|
29
|
100
|
100
|
|
|
57
|
if ( index($d->ua, 'AdsBot-Google-Mobile') > -1 && index($d->ua, 'AdsBot-Google-Mobile-') == -1 ) { |
21
|
2
|
|
|
|
|
6
|
my $h = { |
22
|
|
|
|
|
|
|
name => 'AdsBot-Google-Mobile', |
23
|
|
|
|
|
|
|
is_bot => 1, |
24
|
|
|
|
|
|
|
}; |
25
|
|
|
|
|
|
|
|
26
|
2
|
|
|
|
|
7
|
return Duadua::Util->set_os($d, $h); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
27
|
100
|
|
|
|
62
|
if ( index($d->ua, 'AdsBot-Google-Mobile-Apps') > -1 ) { |
30
|
|
|
|
|
|
|
return { |
31
|
1
|
|
|
|
|
6
|
name => 'AdsBot-Google-Mobile-Apps', |
32
|
|
|
|
|
|
|
is_bot => 1, |
33
|
|
|
|
|
|
|
}; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
26
|
100
|
100
|
|
|
57
|
if ( (index($d->ua, 'SAMSUNG-SGH-E250/') == 0 || index($d->ua, 'DoCoMo/') == 0) |
|
|
|
66
|
|
|
|
|
37
|
|
|
|
|
|
|
&& index($d->ua, ' Googlebot-Mobile/') > -1 ) { |
38
|
|
|
|
|
|
|
return { |
39
|
2
|
|
|
|
|
10
|
name => 'Googlebot-Mobile', |
40
|
|
|
|
|
|
|
is_bot => 1, |
41
|
|
|
|
|
|
|
}; |
42
|
|
|
|
|
|
|
} |
43
|
|
|
|
|
|
|
|
44
|
24
|
100
|
|
|
|
67
|
if ( index($d->ua, 'DuplexWeb-Google') > -1 ) { |
45
|
2
|
|
|
|
|
7
|
my $h = { |
46
|
|
|
|
|
|
|
name => 'DuplexWeb-Google', |
47
|
|
|
|
|
|
|
is_bot => 1, |
48
|
|
|
|
|
|
|
}; |
49
|
|
|
|
|
|
|
|
50
|
2
|
100
|
|
|
|
7
|
if ($d->opt_version) { |
51
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!DuplexWeb-Google/([\d.]+)!); |
52
|
1
|
50
|
|
|
|
18
|
$h->{version} = $version if $version; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
2
|
|
|
|
|
10
|
return Duadua::Util->set_os($d, $h); |
56
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
} |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
1; |
61
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
__END__ |