| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Woothee::Crawler; |
|
2
|
|
|
|
|
|
|
|
|
3
|
6
|
|
|
6
|
|
37
|
use strict; |
|
|
6
|
|
|
|
|
9
|
|
|
|
6
|
|
|
|
|
148
|
|
|
4
|
6
|
|
|
6
|
|
24
|
use warnings; |
|
|
6
|
|
|
|
|
9
|
|
|
|
6
|
|
|
|
|
116
|
|
|
5
|
6
|
|
|
6
|
|
26
|
use Carp; |
|
|
6
|
|
|
|
|
10
|
|
|
|
6
|
|
|
|
|
279
|
|
|
6
|
|
|
|
|
|
|
|
|
7
|
6
|
|
|
6
|
|
30
|
use Woothee::Util qw/update_map update_category update_version update_os/; |
|
|
6
|
|
|
|
|
21
|
|
|
|
6
|
|
|
|
|
294
|
|
|
8
|
6
|
|
|
6
|
|
40
|
use Woothee::DataSet qw/dataset/; |
|
|
6
|
|
|
|
|
10
|
|
|
|
6
|
|
|
|
|
7375
|
|
|
9
|
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
our $VERSION = "1.8.0"; |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
sub challenge_google { |
|
13
|
1446
|
|
|
1446
|
0
|
1926
|
my ($ua,$result) = @_; |
|
14
|
|
|
|
|
|
|
|
|
15
|
1446
|
100
|
|
|
|
5851
|
return 0 if index($ua, "Google") < 0; |
|
16
|
|
|
|
|
|
|
|
|
17
|
72
|
100
|
|
|
|
224
|
if (index($ua, "compatible; Googlebot") > -1 ) { |
|
18
|
18
|
100
|
|
|
|
53
|
if (index($ua, "compatible; Googlebot-Mobile") > -1) { |
|
19
|
12
|
|
|
|
|
29
|
update_map($result, dataset('GoogleBotMobile')); |
|
20
|
12
|
|
|
|
|
39
|
return 1; |
|
21
|
|
|
|
|
|
|
} |
|
22
|
|
|
|
|
|
|
else { |
|
23
|
6
|
|
|
|
|
23
|
update_map($result, dataset('GoogleBot')); |
|
24
|
6
|
|
|
|
|
25
|
return 1; |
|
25
|
|
|
|
|
|
|
} |
|
26
|
|
|
|
|
|
|
} |
|
27
|
54
|
100
|
|
|
|
149
|
if (index($ua, "Googlebot-Image/") > -1) { |
|
28
|
6
|
|
|
|
|
17
|
update_map($result, dataset('GoogleBot')); |
|
29
|
6
|
|
|
|
|
21
|
return 1; |
|
30
|
|
|
|
|
|
|
} |
|
31
|
48
|
100
|
|
|
|
132
|
if (index($ua, "Mediapartners-Google") > -1) { |
|
32
|
12
|
50
|
66
|
|
|
58
|
if (index($ua, "compatible; Mediapartners-Google") > -1 || $ua eq "Mediapartners-Google") { |
|
33
|
12
|
|
|
|
|
34
|
update_map($result, dataset('GoogleMediaPartners')); |
|
34
|
12
|
|
|
|
|
41
|
return 1; |
|
35
|
|
|
|
|
|
|
} |
|
36
|
|
|
|
|
|
|
} |
|
37
|
36
|
100
|
|
|
|
106
|
if (index($ua, "Feedfetcher-Google;") > -1) { |
|
38
|
6
|
|
|
|
|
21
|
update_map($result, dataset("GoogleFeedFetcher")); |
|
39
|
6
|
|
|
|
|
24
|
return 1; |
|
40
|
|
|
|
|
|
|
} |
|
41
|
30
|
100
|
|
|
|
85
|
if (index($ua, "AppEngine-Google") > -1) { |
|
42
|
6
|
|
|
|
|
17
|
update_map($result, dataset('GoogleAppEngine')); |
|
43
|
6
|
|
|
|
|
26
|
return 1; |
|
44
|
|
|
|
|
|
|
} |
|
45
|
24
|
100
|
|
|
|
88
|
if (index($ua, "Google Web Preview") > -1) { |
|
46
|
6
|
|
|
|
|
18
|
update_map($result, dataset('GoogleWebPreview')); |
|
47
|
6
|
|
|
|
|
24
|
return 1; |
|
48
|
|
|
|
|
|
|
} |
|
49
|
|
|
|
|
|
|
|
|
50
|
18
|
|
|
|
|
49
|
return 0; |
|
51
|
|
|
|
|
|
|
} |
|
52
|
|
|
|
|
|
|
|
|
53
|
|
|
|
|
|
|
sub challenge_crawlers { |
|
54
|
1392
|
|
|
1392
|
0
|
1877
|
my ($ua,$result) = @_; |
|
55
|
|
|
|
|
|
|
|
|
56
|
1392
|
100
|
100
|
|
|
30646
|
if (index($ua, "Yahoo") > -1 || |
|
|
|
100
|
100
|
|
|
|
|
|
|
|
100
|
100
|
|
|
|
|
|
|
|
100
|
100
|
|
|
|
|
|
|
|
100
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
index($ua, "help.yahoo.co.jp/help/jp/") > -1 || |
|
58
|
|
|
|
|
|
|
index($ua, "listing.yahoo.co.jp/support/faq/") > -1) { |
|
59
|
66
|
100
|
100
|
|
|
556
|
if (index($ua, "compatible; Yahoo! Slurp") > -1) { |
|
|
|
100
|
100
|
|
|
|
|
|
|
|
100
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
60
|
12
|
|
|
|
|
32
|
update_map($result, dataset("YahooSlurp")); |
|
61
|
12
|
|
|
|
|
37
|
return 1; |
|
62
|
|
|
|
|
|
|
} |
|
63
|
|
|
|
|
|
|
elsif (index($ua, "YahooFeedSeekerJp") > -1 || index($ua, "YahooFeedSeekerBetaJp") > -1) { |
|
64
|
12
|
|
|
|
|
32
|
update_map($result, dataset("YahooJP")); |
|
65
|
12
|
|
|
|
|
39
|
return 1; |
|
66
|
|
|
|
|
|
|
} |
|
67
|
|
|
|
|
|
|
elsif (index($ua, "crawler (http://listing.yahoo.co.jp/support/faq/") > -1 || |
|
68
|
|
|
|
|
|
|
index($ua, "crawler (http://help.yahoo.co.jp/help/jp/") > -1 ) { |
|
69
|
18
|
|
|
|
|
43
|
update_map($result, dataset("YahooJP")); |
|
70
|
18
|
|
|
|
|
57
|
return 1; |
|
71
|
|
|
|
|
|
|
} |
|
72
|
|
|
|
|
|
|
elsif (index($ua, 'Y!J-BRZ/YATSHA crawler') > -1 || index($ua, 'Y!J-BRY/YATSH crawler') > -1) { |
|
73
|
12
|
|
|
|
|
32
|
update_map($result, dataset('YahooJP')); |
|
74
|
12
|
|
|
|
|
38
|
return 1; |
|
75
|
|
|
|
|
|
|
} |
|
76
|
|
|
|
|
|
|
elsif (index($ua, "Yahoo Pipes") > -1) { |
|
77
|
6
|
|
|
|
|
19
|
update_map($result, dataset("YahooPipes")); |
|
78
|
6
|
|
|
|
|
43
|
return 1; |
|
79
|
|
|
|
|
|
|
} |
|
80
|
|
|
|
|
|
|
} |
|
81
|
|
|
|
|
|
|
elsif (index($ua, "msnbot") > -1) { |
|
82
|
30
|
|
|
|
|
67
|
update_map($result, dataset("msnbot")); |
|
83
|
30
|
|
|
|
|
74
|
return 1; |
|
84
|
|
|
|
|
|
|
} |
|
85
|
|
|
|
|
|
|
elsif (index($ua, "bingbot") > -1) { |
|
86
|
6
|
50
|
|
|
|
32
|
if (index($ua, "compatible; bingbot") > -1) { |
|
87
|
6
|
|
|
|
|
21
|
update_map($result, dataset("bingbot")); |
|
88
|
6
|
|
|
|
|
22
|
return 1; |
|
89
|
|
|
|
|
|
|
} |
|
90
|
|
|
|
|
|
|
} |
|
91
|
|
|
|
|
|
|
elsif (index($ua, "BingPreview") > -1) { |
|
92
|
6
|
|
|
|
|
21
|
update_map($result, dataset("BingPreview")); |
|
93
|
6
|
|
|
|
|
18
|
return 1; |
|
94
|
|
|
|
|
|
|
} |
|
95
|
|
|
|
|
|
|
elsif (index($ua, "Baidu") > -1) { |
|
96
|
18
|
50
|
100
|
|
|
95
|
if (index($ua, "compatible; Baiduspider") > -1 || index($ua, "Baiduspider+") > -1 || index($ua, "Baiduspider-image+") > -1) { |
|
|
|
|
66
|
|
|
|
|
|
97
|
18
|
|
|
|
|
41
|
update_map($result, dataset("Baiduspider")); |
|
98
|
18
|
|
|
|
|
56
|
return 1; |
|
99
|
|
|
|
|
|
|
} |
|
100
|
|
|
|
|
|
|
} |
|
101
|
|
|
|
|
|
|
elsif (index($ua, "Yeti") > -1) { |
|
102
|
18
|
50
|
100
|
|
|
108
|
if (index($ua, "http://help.naver.com/robots") > -1 || |
|
|
|
|
66
|
|
|
|
|
|
103
|
|
|
|
|
|
|
index($ua, "http://help.naver.com/support/robots.html") > -1 || |
|
104
|
|
|
|
|
|
|
index($ua, "http://naver.me/bot") > -1) { |
|
105
|
|
|
|
|
|
|
|
|
106
|
18
|
|
|
|
|
46
|
update_map($result, dataset("Yeti")); |
|
107
|
18
|
|
|
|
|
58
|
return 1; |
|
108
|
|
|
|
|
|
|
} |
|
109
|
|
|
|
|
|
|
} |
|
110
|
|
|
|
|
|
|
elsif (index($ua, "FeedBurner/") > -1) { |
|
111
|
6
|
|
|
|
|
20
|
update_map($result, dataset("FeedBurner")); |
|
112
|
6
|
|
|
|
|
19
|
return 1; |
|
113
|
|
|
|
|
|
|
} |
|
114
|
|
|
|
|
|
|
elsif (index($ua, "facebookexternalhit") > -1) { |
|
115
|
6
|
|
|
|
|
19
|
update_map($result, dataset("facebook")); |
|
116
|
6
|
|
|
|
|
17
|
return 1; |
|
117
|
|
|
|
|
|
|
} |
|
118
|
|
|
|
|
|
|
elsif (index($ua, "Twitterbot/") > -1) { |
|
119
|
6
|
|
|
|
|
19
|
update_map($result, dataset("twitter")); |
|
120
|
6
|
|
|
|
|
16
|
return 1; |
|
121
|
|
|
|
|
|
|
} |
|
122
|
|
|
|
|
|
|
elsif (index($ua, "ichiro") > -1) { |
|
123
|
12
|
50
|
66
|
|
|
68
|
if (index($ua, "http://help.goo.ne.jp/door/crawler.html") > -1 || index($ua, "compatible; ichiro/mobile goo;") > -1) { |
|
124
|
12
|
|
|
|
|
31
|
update_map($result, dataset("goo")); |
|
125
|
12
|
|
|
|
|
38
|
return 1; |
|
126
|
|
|
|
|
|
|
} |
|
127
|
|
|
|
|
|
|
} |
|
128
|
|
|
|
|
|
|
elsif (index($ua, "gooblogsearch/") > -1) { |
|
129
|
6
|
|
|
|
|
31
|
update_map($result, dataset("goo")); |
|
130
|
6
|
|
|
|
|
18
|
return 1; |
|
131
|
|
|
|
|
|
|
} |
|
132
|
|
|
|
|
|
|
elsif (index($ua, "Apple-PubSub") > -1) { |
|
133
|
6
|
|
|
|
|
21
|
update_map($result, dataset("ApplePubSub")); |
|
134
|
6
|
|
|
|
|
17
|
return 1; |
|
135
|
|
|
|
|
|
|
} |
|
136
|
|
|
|
|
|
|
elsif (index($ua, "(www.radian6.com/crawler)") > -1) { |
|
137
|
12
|
|
|
|
|
32
|
update_map($result, dataset("radian6")); |
|
138
|
12
|
|
|
|
|
44
|
return 1; |
|
139
|
|
|
|
|
|
|
} |
|
140
|
|
|
|
|
|
|
elsif (index($ua, "Genieo/") > -1) { |
|
141
|
6
|
|
|
|
|
20
|
update_map($result, dataset("Genieo")); |
|
142
|
6
|
|
|
|
|
17
|
return 1; |
|
143
|
|
|
|
|
|
|
} |
|
144
|
|
|
|
|
|
|
elsif (index($ua, "labs.topsy.com/butterfly/") > -1) { |
|
145
|
6
|
|
|
|
|
20
|
update_map($result, dataset("topsyButterfly")); |
|
146
|
6
|
|
|
|
|
20
|
return 1; |
|
147
|
|
|
|
|
|
|
} |
|
148
|
|
|
|
|
|
|
elsif (index($ua, "rogerbot/1.0 (http://www.seomoz.org/dp/rogerbot") > -1) { |
|
149
|
12
|
|
|
|
|
33
|
update_map($result, dataset("rogerbot")); |
|
150
|
12
|
|
|
|
|
30
|
return 1; |
|
151
|
|
|
|
|
|
|
} |
|
152
|
|
|
|
|
|
|
elsif (index($ua, "compatible; AhrefsBot/") > -1) { |
|
153
|
6
|
|
|
|
|
19
|
update_map($result, dataset("AhrefsBot")); |
|
154
|
6
|
|
|
|
|
19
|
return 1; |
|
155
|
|
|
|
|
|
|
} |
|
156
|
|
|
|
|
|
|
elsif (index($ua, "livedoor FeedFetcher") > -1 || index($ua, "Fastladder FeedFetcher") > -1) { |
|
157
|
12
|
|
|
|
|
33
|
update_map($result, dataset("livedoorFeedFetcher")); |
|
158
|
12
|
|
|
|
|
32
|
return 1; |
|
159
|
|
|
|
|
|
|
} |
|
160
|
|
|
|
|
|
|
elsif (index($ua, "Hatena ") > -1) { |
|
161
|
18
|
50
|
100
|
|
|
95
|
if (index($ua, "Hatena Antenna") > -1 || index($ua, "Hatena Pagetitle Agent") > -1 || index($ua, "Hatena Diary RSS") > -1) { |
|
|
|
|
66
|
|
|
|
|
|
162
|
18
|
|
|
|
|
46
|
update_map($result, dataset("Hatena")); |
|
163
|
18
|
|
|
|
|
52
|
return 1; |
|
164
|
|
|
|
|
|
|
} |
|
165
|
|
|
|
|
|
|
} |
|
166
|
|
|
|
|
|
|
elsif (index($ua, "mixi-check") > -1 || index($ua, "mixi-crawler") > -1 || index($ua, "mixi-news-crawler") > -1) { |
|
167
|
18
|
|
|
|
|
41
|
update_map($result, dataset("mixi")); |
|
168
|
18
|
|
|
|
|
74
|
return 1; |
|
169
|
|
|
|
|
|
|
} |
|
170
|
|
|
|
|
|
|
elsif (index($ua, "Indy Library") > -1) { |
|
171
|
6
|
50
|
|
|
|
32
|
if (index($ua, "compatible; Indy Library") > -1) { |
|
172
|
6
|
|
|
|
|
24
|
update_map($result, dataset("IndyLibrary")); |
|
173
|
6
|
|
|
|
|
22
|
return 1; |
|
174
|
|
|
|
|
|
|
} |
|
175
|
|
|
|
|
|
|
} |
|
176
|
|
|
|
|
|
|
elsif (index($ua, "trendictionbot") > -1) { |
|
177
|
6
|
|
|
|
|
19
|
update_map($result, dataset("trendictionbot")); |
|
178
|
6
|
|
|
|
|
20
|
return 1; |
|
179
|
|
|
|
|
|
|
} |
|
180
|
|
|
|
|
|
|
|
|
181
|
1110
|
|
|
|
|
2483
|
return 0; |
|
182
|
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
} |
|
184
|
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
sub challenge_maybe_crawler { |
|
186
|
69
|
|
|
69
|
0
|
112
|
my ($ua, $result) = @_; |
|
187
|
|
|
|
|
|
|
|
|
188
|
69
|
100
|
|
|
|
417
|
if ($ua =~ m{(bot|crawler|spider)(?:[-_ ./;@()]|$)}oi) { |
|
189
|
48
|
|
|
|
|
156
|
update_map($result, dataset("VariousCrawler")); |
|
190
|
48
|
|
|
|
|
130
|
return 1; |
|
191
|
|
|
|
|
|
|
} |
|
192
|
21
|
100
|
66
|
|
|
100
|
if ($ua =~ m{^(?:Rome Client |UnwindFetchor/|ia_archiver |Summify |PostRank/)}o |
|
193
|
|
|
|
|
|
|
or index($ua, "ASP-Ranker Feed Crawler") > -1) { |
|
194
|
12
|
|
|
|
|
30
|
update_map($result, dataset("VariousCrawler")); |
|
195
|
12
|
|
|
|
|
37
|
return 1; |
|
196
|
|
|
|
|
|
|
} |
|
197
|
9
|
100
|
|
|
|
52
|
if ($ua =~ m{(feed|web) ?parser}oi) { |
|
198
|
6
|
|
|
|
|
19
|
update_map($result, dataset("VariousCrawler")); |
|
199
|
6
|
|
|
|
|
17
|
return 1; |
|
200
|
|
|
|
|
|
|
} |
|
201
|
3
|
50
|
|
|
|
16
|
if ($ua =~ m{watch ?dog}oi) { |
|
202
|
3
|
|
|
|
|
12
|
update_map($result, dataset("VariousCrawler")); |
|
203
|
3
|
|
|
|
|
12
|
return 1; |
|
204
|
|
|
|
|
|
|
} |
|
205
|
|
|
|
|
|
|
|
|
206
|
0
|
|
|
|
|
|
return 0; |
|
207
|
|
|
|
|
|
|
} |
|
208
|
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
1; |
|
210
|
|
|
|
|
|
|
|
|
211
|
|
|
|
|
|
|
__END__ |