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