woothee 1.5.0 → 1.7.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +2 -3
- data/lib/woothee/browser.rb +13 -1
- data/lib/woothee/crawler.rb +5 -1
- data/lib/woothee/dataset.rb +4 -1
- data/lib/woothee/misc.rb +2 -0
- data/lib/woothee/version.rb +1 -1
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 75fbedaeb0a5bfd189803a040fbafbb58a997c2b
|
4
|
+
data.tar.gz: 8fe27707e281642e70de3f5807fe50b67ee05ed1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69dc257d2c9a05fc680edec8c7d742ae595d71b3d94d16b4d5dc3582ba45c03d88827f80ba7b0ffa4c56b40a0fbc91faaffd2936d2d42276feb0de5e6251e2c7
|
7
|
+
data.tar.gz: 8bd673b6a3de030d3b1a4e3daa6a5986c2ea8af10f821defb16f8672b8dae840ef65f884adb83bf94310b7c7c1652ce97777417deff0b16797aa5b46e9dba2b2
|
data/.travis.yml
CHANGED
data/lib/woothee/browser.rb
CHANGED
@@ -25,6 +25,7 @@ module Woothee::Browser
|
|
25
25
|
|
26
26
|
def self.challenge_safari_chrome(ua, result)
|
27
27
|
return false if ua.index('Safari/').nil?
|
28
|
+
return false if ua.index('Chrome') && ua.index('wv')
|
28
29
|
|
29
30
|
version = Woothee::VALUE_UNKNOWN
|
30
31
|
|
@@ -98,7 +99,18 @@ module Woothee::Browser
|
|
98
99
|
end
|
99
100
|
|
100
101
|
def self.challenge_webview(ua, result)
|
101
|
-
|
102
|
+
# Android(Lollipop and Above)
|
103
|
+
if ua.index('Chrome') && ua.index('wv')
|
104
|
+
version = if ua =~ /Version\/([.0-9]+)/
|
105
|
+
$1
|
106
|
+
else
|
107
|
+
Woothee::VALUE_UNKNOWN
|
108
|
+
end
|
109
|
+
|
110
|
+
update_map(result, Woothee::DataSet.get('Webview'))
|
111
|
+
update_version(result, version)
|
112
|
+
return true
|
113
|
+
end
|
102
114
|
|
103
115
|
# iOS
|
104
116
|
if ua =~ /iP(?:hone;|ad;|od) .*like Mac OS X/
|
data/lib/woothee/crawler.rb
CHANGED
@@ -88,7 +88,7 @@ module Woothee::Crawler
|
|
88
88
|
end
|
89
89
|
end
|
90
90
|
if ua.index('Yeti')
|
91
|
-
if ua.index('http://help.naver.com/robots')
|
91
|
+
if ua.index('http://help.naver.com/robots') || ua.index('http://help.naver.com/support/robots.html') || ua.index('http://naver.me/bot')
|
92
92
|
update_map(result, Woothee::DataSet.get('Yeti'))
|
93
93
|
return true
|
94
94
|
end
|
@@ -159,6 +159,10 @@ module Woothee::Crawler
|
|
159
159
|
return true
|
160
160
|
end
|
161
161
|
end
|
162
|
+
if ua.index('trendictionbot')
|
163
|
+
update_map(result, Woothee::DataSet.get('trendictionbot'))
|
164
|
+
return true
|
165
|
+
end
|
162
166
|
|
163
167
|
false
|
164
168
|
end
|
data/lib/woothee/dataset.rb
CHANGED
@@ -35,7 +35,7 @@ end
|
|
35
35
|
|
36
36
|
module Woothee::DataSet
|
37
37
|
DATASET = {}
|
38
|
-
# GENERATED from dataset.yaml at
|
38
|
+
# GENERATED from dataset.yaml at Sat Apr 29 16:14:32 JST 2017 by yuya
|
39
39
|
obj = {:label => 'MSIE', :name => 'Internet Explorer', :type => :browser}
|
40
40
|
obj[:vendor] = 'Microsoft'
|
41
41
|
DATASET[obj[:label]] = obj
|
@@ -303,6 +303,9 @@ module Woothee::DataSet
|
|
303
303
|
obj = {:label => 'twitter', :name => 'twitter', :type => :full}
|
304
304
|
obj[:category] = :crawler
|
305
305
|
DATASET[obj[:label]] = obj
|
306
|
+
obj = {:label => 'trendictionbot', :name => 'trendiction', :type => :full}
|
307
|
+
obj[:category] = :crawler
|
308
|
+
DATASET[obj[:label]] = obj
|
306
309
|
obj = {:label => 'mixi', :name => 'mixi', :type => :full}
|
307
310
|
obj[:category] = :crawler
|
308
311
|
DATASET[obj[:label]] = obj
|
data/lib/woothee/misc.rb
CHANGED
@@ -46,6 +46,8 @@ module Woothee::Misc
|
|
46
46
|
[Woothee::DataSet.get('HTTPLibrary'), 'python']
|
47
47
|
when ua =~ /^(?:PHP|WordPress|CakePHP|PukiWiki|PECL::HTTP)(?:\/| |$)/o || ua =~ /(?:PEAR |)HTTP_Request(?: class|2)/o
|
48
48
|
[Woothee::DataSet.get('HTTPLibrary'), 'php']
|
49
|
+
when ua.index('curl/') == 0
|
50
|
+
[Woothee::DataSet.get('HTTPLibrary'), 'curl']
|
49
51
|
else [nil,nil]
|
50
52
|
end
|
51
53
|
return false unless data
|
data/lib/woothee/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: woothee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.7.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- TAGOMORI Satoshi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-05-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -86,7 +86,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
86
86
|
version: '0'
|
87
87
|
requirements: []
|
88
88
|
rubyforge_project:
|
89
|
-
rubygems_version: 2.
|
89
|
+
rubygems_version: 2.6.11
|
90
90
|
signing_key:
|
91
91
|
specification_version: 4
|
92
92
|
summary: Cross-language UserAgent classifier library, ruby implementation
|
@@ -94,4 +94,3 @@ test_files:
|
|
94
94
|
- spec/00_valid_spec.rb
|
95
95
|
- spec/01_dataset_spec.rb
|
96
96
|
- spec/02_run_testsets_spec.rb
|
97
|
-
has_rdoc: false
|