line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Duadua::Parser::Browser::BrowserMisc; |
2
|
6
|
|
|
6
|
|
34
|
use strict; |
|
6
|
|
|
|
|
10
|
|
|
6
|
|
|
|
|
153
|
|
3
|
6
|
|
|
6
|
|
25
|
use warnings; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
117
|
|
4
|
6
|
|
|
6
|
|
22
|
use Duadua::Util; |
|
6
|
|
|
|
|
11
|
|
|
6
|
|
|
|
|
4820
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub try { |
7
|
110
|
|
|
110
|
1
|
225
|
my ($class, $d) = @_; |
8
|
|
|
|
|
|
|
|
9
|
110
|
100
|
66
|
|
|
281
|
if ( $d->ua eq 'lynx' ) { |
|
|
100
|
33
|
|
|
|
|
|
|
100
|
66
|
|
|
|
|
|
|
100
|
66
|
|
|
|
|
|
|
100
|
66
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
10
|
|
|
|
|
|
|
return { |
11
|
1
|
|
|
|
|
6
|
name => 'Lynx', |
12
|
|
|
|
|
|
|
}; |
13
|
|
|
|
|
|
|
} |
14
|
|
|
|
|
|
|
elsif ( index($d->ua, 'Lynx/') == 0 ) { |
15
|
2
|
|
|
|
|
6
|
my $h = { |
16
|
|
|
|
|
|
|
name => 'Lynx', |
17
|
|
|
|
|
|
|
}; |
18
|
|
|
|
|
|
|
|
19
|
2
|
100
|
|
|
|
7
|
if ($d->opt_version) { |
20
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^Lynx/([\d.a-z]+)!); |
21
|
1
|
50
|
|
|
|
5
|
$h->{version} = $version if $version; |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
|
24
|
2
|
|
|
|
|
9
|
return $h; |
25
|
|
|
|
|
|
|
} |
26
|
|
|
|
|
|
|
elsif ( index($d->ua, ' EzLynx/') > -1 ) { |
27
|
2
|
|
|
|
|
7
|
my $h = { |
28
|
|
|
|
|
|
|
name => 'EzLynx', |
29
|
|
|
|
|
|
|
}; |
30
|
|
|
|
|
|
|
|
31
|
2
|
100
|
|
|
|
17
|
if ($d->opt_version) { |
32
|
1
|
|
|
|
|
15
|
my ($version) = ($d->ua =~ m!EzLynx/([\d.]+)!); |
33
|
1
|
50
|
|
|
|
5
|
$h->{version} = $version if $version; |
34
|
|
|
|
|
|
|
} |
35
|
|
|
|
|
|
|
|
36
|
2
|
|
|
|
|
14
|
return Duadua::Util->set_os($d, $h); |
37
|
|
|
|
|
|
|
} |
38
|
|
|
|
|
|
|
elsif ( index($d->ua, 'w3m/') > -1 ) { |
39
|
2
|
|
|
|
|
7
|
my $h = { |
40
|
|
|
|
|
|
|
name => 'w3m', |
41
|
|
|
|
|
|
|
}; |
42
|
|
|
|
|
|
|
|
43
|
2
|
100
|
|
|
|
119
|
if ($d->opt_version) { |
44
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!^w3m/([\d.]+)!); |
45
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
46
|
|
|
|
|
|
|
} |
47
|
|
|
|
|
|
|
|
48
|
2
|
|
|
|
|
82
|
return $h; |
49
|
|
|
|
|
|
|
} |
50
|
|
|
|
|
|
|
elsif ( index($d->ua, ' Konqueror/') > -1 ) { |
51
|
2
|
|
|
|
|
6
|
my $h = { |
52
|
|
|
|
|
|
|
name => 'Konqueror', |
53
|
|
|
|
|
|
|
}; |
54
|
|
|
|
|
|
|
|
55
|
2
|
100
|
|
|
|
8
|
if ($d->opt_version) { |
56
|
1
|
|
|
|
|
5
|
my ($version) = ($d->ua =~ m! Konqueror/([\d.]+)!); |
57
|
1
|
50
|
|
|
|
5
|
$h->{version} = $version if $version; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
2
|
|
|
|
|
8
|
return Duadua::Util->set_os($d, $h); |
61
|
|
|
|
|
|
|
} |
62
|
|
|
|
|
|
|
elsif ( index($d->ua, 'OmniWeb/') == 0 |
63
|
|
|
|
|
|
|
|| (index($d->ua, ' OmniWeb/') > -1 && index($d->ua, 'Mozilla/') > -1) ) { |
64
|
2
|
|
|
|
|
8
|
my $h = { |
65
|
|
|
|
|
|
|
name => 'OmniWeb', |
66
|
|
|
|
|
|
|
is_ios => 1, |
67
|
|
|
|
|
|
|
}; |
68
|
|
|
|
|
|
|
|
69
|
2
|
100
|
|
|
|
7
|
if ($d->opt_version) { |
70
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m!OmniWeb/([\d.]+)!); |
71
|
1
|
50
|
|
|
|
6
|
$h->{version} = $version if $version; |
72
|
|
|
|
|
|
|
} |
73
|
|
|
|
|
|
|
|
74
|
2
|
|
|
|
|
9
|
return $h; |
75
|
|
|
|
|
|
|
} |
76
|
|
|
|
|
|
|
elsif ( index($d->ua, ' QtWebEngine/') > -1 && index($d->ua, 'Mozilla/') > -1 ) { |
77
|
2
|
|
|
|
|
8
|
my $h = { |
78
|
|
|
|
|
|
|
name => 'QtWebEngine', |
79
|
|
|
|
|
|
|
}; |
80
|
|
|
|
|
|
|
|
81
|
2
|
100
|
|
|
|
19
|
if ($d->opt_version) { |
82
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m! QtWebEngine/([\d.]+)!); |
83
|
1
|
50
|
|
|
|
7
|
$h->{version} = $version if $version; |
84
|
|
|
|
|
|
|
} |
85
|
|
|
|
|
|
|
|
86
|
2
|
|
|
|
|
8
|
return Duadua::Util->set_os($d, $h); |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
elsif ( index($d->ua, ' UBrowser/') > -1 && index($d->ua, 'Win') > -1 ) { |
89
|
2
|
|
|
|
|
6
|
my $h = { |
90
|
|
|
|
|
|
|
name => 'UBrowser', |
91
|
|
|
|
|
|
|
}; |
92
|
|
|
|
|
|
|
|
93
|
2
|
100
|
|
|
|
6
|
if ($d->opt_version) { |
94
|
1
|
|
|
|
|
3
|
my ($version) = ($d->ua =~ m! UBrowser/([\d.]+)!); |
95
|
1
|
50
|
|
|
|
5
|
$h->{version} = $version if $version; |
96
|
|
|
|
|
|
|
} |
97
|
|
|
|
|
|
|
|
98
|
2
|
|
|
|
|
9
|
return Duadua::Util->set_os($d, $h); |
99
|
|
|
|
|
|
|
} |
100
|
|
|
|
|
|
|
elsif ( index($d->ua, ' MZBrowser/') > -1 && index($d->ua, 'UWS') > -1 ) { |
101
|
2
|
|
|
|
|
7
|
my $h = { |
102
|
|
|
|
|
|
|
name => 'MZBrowser', |
103
|
|
|
|
|
|
|
}; |
104
|
|
|
|
|
|
|
|
105
|
2
|
100
|
|
|
|
16
|
if ($d->opt_version) { |
106
|
1
|
|
|
|
|
4
|
my ($version) = ($d->ua =~ m! MZBrowser/([\d.\-]+)!); |
107
|
1
|
50
|
|
|
|
5
|
$h->{version} = $version if $version; |
108
|
|
|
|
|
|
|
} |
109
|
|
|
|
|
|
|
|
110
|
2
|
|
|
|
|
11
|
return Duadua::Util->set_os($d, $h); |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
} |
113
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
1; |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
__END__ |