market_bot 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/market_bot/android/app.rb +6 -10
- data/market_bot.gemspec +1 -1
- data/spec/market_bot/android/app_spec.rb +3 -0
- metadata +20 -20
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.1
|
@@ -4,7 +4,7 @@ module MarketBot
|
|
4
4
|
class App
|
5
5
|
MARKET_ATTRIBUTES = [:title, :rating, :updated, :current_version, :requires_android,
|
6
6
|
:category, :installs, :size, :price, :content_rating, :description,
|
7
|
-
:votes]
|
7
|
+
:votes, :developer]
|
8
8
|
|
9
9
|
attr_reader :app_id
|
10
10
|
attr_reader *MARKET_ATTRIBUTES
|
@@ -50,26 +50,22 @@ module MarketBot
|
|
50
50
|
votes_elem = doc.css('.votes')
|
51
51
|
result[:votes] = doc.css('.votes').first.text unless votes_elem.empty?
|
52
52
|
|
53
|
-
|
53
|
+
result[:developer] = doc.css('.doc-header-link').first.text
|
54
54
|
|
55
|
-
if similar_elem
|
55
|
+
if similar_elem = doc.css('.doc-similar').first
|
56
56
|
similar_elem.children.each do |similar_elem_child|
|
57
57
|
assoc_app_type = similar_elem_child.attributes['data-analyticsid'].text
|
58
58
|
|
59
|
-
|
60
|
-
when 'more-from-developer'
|
61
|
-
when 'users-also-installed'
|
62
|
-
when 'related'
|
63
|
-
else
|
64
|
-
next
|
65
|
-
end
|
59
|
+
next unless %w(more-from-developer users-also-installed related).include?(assoc_app_type)
|
66
60
|
|
67
61
|
assoc_app_type = assoc_app_type.gsub('-', '_').to_sym
|
68
62
|
result[assoc_app_type] ||= []
|
69
63
|
|
70
64
|
similar_elem_child.css('.app-left-column-related-snippet-container').each do |app_elem|
|
71
65
|
assoc_app = {}
|
66
|
+
|
72
67
|
assoc_app[:app_id] = app_elem.attributes['data-docid'].text
|
68
|
+
|
73
69
|
result[assoc_app_type] << assoc_app
|
74
70
|
end
|
75
71
|
end
|
data/market_bot.gemspec
CHANGED
@@ -58,6 +58,7 @@ describe 'App' do
|
|
58
58
|
result[:content_rating].should == 'Everyone'
|
59
59
|
result[:description].should =~ /^Experience the next level of chain/
|
60
60
|
result[:votes].should == '4'
|
61
|
+
result[:developer].should == 'Blue Frog Gaming'
|
61
62
|
|
62
63
|
result
|
63
64
|
end
|
@@ -76,6 +77,7 @@ describe 'App' do
|
|
76
77
|
result[:content_rating].should == 'Low Maturity'
|
77
78
|
result[:description].should =~ /^Evernote turns your Android device into an extension/
|
78
79
|
result[:votes].should == '173,307'
|
80
|
+
result[:developer].should == 'Evernote Corp.'
|
79
81
|
result[:installs].should == nil
|
80
82
|
end
|
81
83
|
|
@@ -91,6 +93,7 @@ describe 'App' do
|
|
91
93
|
result[:price].should == '$0.99'
|
92
94
|
result[:content_rating].should == 'Low Maturity'
|
93
95
|
result[:description].should =~ /^Want to know the up-to-date temperature and other weather/
|
96
|
+
result[:developer].should == 'Kooistar Solutions'
|
94
97
|
result[:rating].should == nil
|
95
98
|
result[:votes].should == nil
|
96
99
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: market_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2011-10-27 00:00:00.000000000Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: typhoeus
|
16
|
-
requirement: &
|
16
|
+
requirement: &70324478273160 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,10 +21,10 @@ dependencies:
|
|
21
21
|
version: 0.2.4
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70324478273160
|
25
25
|
- !ruby/object:Gem::Dependency
|
26
26
|
name: nokogiri
|
27
|
-
requirement: &
|
27
|
+
requirement: &70324478272680 !ruby/object:Gem::Requirement
|
28
28
|
none: false
|
29
29
|
requirements:
|
30
30
|
- - ~>
|
@@ -32,10 +32,10 @@ dependencies:
|
|
32
32
|
version: 1.5.0
|
33
33
|
type: :runtime
|
34
34
|
prerelease: false
|
35
|
-
version_requirements: *
|
35
|
+
version_requirements: *70324478272680
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: rspec
|
38
|
-
requirement: &
|
38
|
+
requirement: &70324478272200 !ruby/object:Gem::Requirement
|
39
39
|
none: false
|
40
40
|
requirements:
|
41
41
|
- - ~>
|
@@ -43,10 +43,10 @@ dependencies:
|
|
43
43
|
version: 2.3.0
|
44
44
|
type: :development
|
45
45
|
prerelease: false
|
46
|
-
version_requirements: *
|
46
|
+
version_requirements: *70324478272200
|
47
47
|
- !ruby/object:Gem::Dependency
|
48
48
|
name: bundler
|
49
|
-
requirement: &
|
49
|
+
requirement: &70324478271720 !ruby/object:Gem::Requirement
|
50
50
|
none: false
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
@@ -54,10 +54,10 @@ dependencies:
|
|
54
54
|
version: 1.0.0
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
|
-
version_requirements: *
|
57
|
+
version_requirements: *70324478271720
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: jeweler
|
60
|
-
requirement: &
|
60
|
+
requirement: &70324478271240 !ruby/object:Gem::Requirement
|
61
61
|
none: false
|
62
62
|
requirements:
|
63
63
|
- - ~>
|
@@ -65,10 +65,10 @@ dependencies:
|
|
65
65
|
version: 1.6.4
|
66
66
|
type: :development
|
67
67
|
prerelease: false
|
68
|
-
version_requirements: *
|
68
|
+
version_requirements: *70324478271240
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
70
|
name: rcov
|
71
|
-
requirement: &
|
71
|
+
requirement: &70324478270760 !ruby/object:Gem::Requirement
|
72
72
|
none: false
|
73
73
|
requirements:
|
74
74
|
- - ! '>='
|
@@ -76,10 +76,10 @@ dependencies:
|
|
76
76
|
version: '0'
|
77
77
|
type: :development
|
78
78
|
prerelease: false
|
79
|
-
version_requirements: *
|
79
|
+
version_requirements: *70324478270760
|
80
80
|
- !ruby/object:Gem::Dependency
|
81
81
|
name: ZenTest
|
82
|
-
requirement: &
|
82
|
+
requirement: &70324478270280 !ruby/object:Gem::Requirement
|
83
83
|
none: false
|
84
84
|
requirements:
|
85
85
|
- - ~>
|
@@ -87,10 +87,10 @@ dependencies:
|
|
87
87
|
version: 4.6.2
|
88
88
|
type: :development
|
89
89
|
prerelease: false
|
90
|
-
version_requirements: *
|
90
|
+
version_requirements: *70324478270280
|
91
91
|
- !ruby/object:Gem::Dependency
|
92
92
|
name: ruby-debug19
|
93
|
-
requirement: &
|
93
|
+
requirement: &70324478269800 !ruby/object:Gem::Requirement
|
94
94
|
none: false
|
95
95
|
requirements:
|
96
96
|
- - ! '>='
|
@@ -98,10 +98,10 @@ dependencies:
|
|
98
98
|
version: 0.11.6
|
99
99
|
type: :development
|
100
100
|
prerelease: false
|
101
|
-
version_requirements: *
|
101
|
+
version_requirements: *70324478269800
|
102
102
|
- !ruby/object:Gem::Dependency
|
103
103
|
name: rdoc
|
104
|
-
requirement: &
|
104
|
+
requirement: &70324478269320 !ruby/object:Gem::Requirement
|
105
105
|
none: false
|
106
106
|
requirements:
|
107
107
|
- - ! '>='
|
@@ -109,7 +109,7 @@ dependencies:
|
|
109
109
|
version: 3.9.4
|
110
110
|
type: :development
|
111
111
|
prerelease: false
|
112
|
-
version_requirements: *
|
112
|
+
version_requirements: *70324478269320
|
113
113
|
description: Market Bot is a high performance Ruby scraper for Google's Android Market
|
114
114
|
with a simple to use API. It is built on top of Nokogiri and Typhoeus.
|
115
115
|
email: chad@remesch.com
|
@@ -160,7 +160,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
160
160
|
version: '0'
|
161
161
|
segments:
|
162
162
|
- 0
|
163
|
-
hash:
|
163
|
+
hash: -4287194036804087085
|
164
164
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
165
165
|
none: false
|
166
166
|
requirements:
|