market_bot 0.5.0 → 0.5.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/lib/market_bot/android/app.rb +9 -1
- data/market_bot.gemspec +2 -2
- data/spec/market_bot/android/app_spec.rb +3 -0
- metadata +3 -3
data/VERSION
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
0.5.
|
|
1
|
+
0.5.1
|
|
@@ -6,7 +6,7 @@ module MarketBot
|
|
|
6
6
|
:category, :installs, :size, :price, :content_rating, :description,
|
|
7
7
|
:votes, :developer, :more_from_developer, :users_also_installed,
|
|
8
8
|
:related, :banner_icon_url, :banner_image_url, :website_url, :email,
|
|
9
|
-
:youtube_video_ids]
|
|
9
|
+
:youtube_video_ids, :screenshot_urls]
|
|
10
10
|
|
|
11
11
|
attr_reader :app_id
|
|
12
12
|
attr_reader *MARKET_ATTRIBUTES
|
|
@@ -108,6 +108,14 @@ module MarketBot
|
|
|
108
108
|
result[:youtube_video_ids] = []
|
|
109
109
|
end
|
|
110
110
|
|
|
111
|
+
screenshots = doc.css('.screenshot-carousel-content-container img')
|
|
112
|
+
|
|
113
|
+
if screenshots && screenshots.length > 0
|
|
114
|
+
result[:screenshot_urls] = screenshots.map { |s| s.attributes['src'].value }
|
|
115
|
+
else
|
|
116
|
+
result[:screenshot_urls] = []
|
|
117
|
+
end
|
|
118
|
+
|
|
111
119
|
result
|
|
112
120
|
end
|
|
113
121
|
|
data/market_bot.gemspec
CHANGED
|
@@ -5,11 +5,11 @@
|
|
|
5
5
|
|
|
6
6
|
Gem::Specification.new do |s|
|
|
7
7
|
s.name = "market_bot"
|
|
8
|
-
s.version = "0.5.
|
|
8
|
+
s.version = "0.5.1"
|
|
9
9
|
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
|
11
11
|
s.authors = ["Chad Remesch"]
|
|
12
|
-
s.date = "2012-06-
|
|
12
|
+
s.date = "2012-06-14"
|
|
13
13
|
s.description = "Market Bot is a high performance Ruby scraper for Google's Android Market with a simple to use API. It is built on top of Nokogiri and Typhoeus."
|
|
14
14
|
s.email = "chad@remesch.com"
|
|
15
15
|
s.extra_rdoc_files = [
|
|
@@ -29,6 +29,7 @@ def check_getters(app)
|
|
|
29
29
|
app.website_url.should == 'http://bluefroggaming.com'
|
|
30
30
|
app.email.should == 'support@hdgames.zendesk.com'
|
|
31
31
|
app.youtube_video_ids.should == []
|
|
32
|
+
app.screenshot_urls.should == ["https://lh6.ggpht.com/JJWPKPEvz5ivZEeph_gA_oB3VOXYrIrY9lGdGFWHVT4FVub6cUKqxkh5VyxbvVqMXg=h230", "https://lh6.ggpht.com/kPGbJqu42Ukxoa_XZlWxo349y3zNKCayjBD35V2bbt26ZmgpHDegTf8sS5C1VOoAiw=h230", "https://lh3.ggpht.com/S9VMzKxAWSS3IxeUtLYPn-zDg9ojTpVxeHbd3RhHqtXazGRV6-S0jsuNh-GneV9eE2A=h230", "https://lh5.ggpht.com/G0U5k5PpvuEdflN58qzr3uKHGsXk3QqwwLIL_KxVfGNicR7Gn42smetbTBn9SRftnyk=h230", "https://lh6.ggpht.com/j03lPKqJss6066_Q6AbZikU33PWgoR07cPLFgoE5IoNyXwMG6QVX_3-SgI741vnaVnu7=h230", "https://lh3.ggpht.com/YBrG1Hjv7vgNLwp9PaR77gQHwdpInuluSnq9qPG4BwwU7LItCy4m6RQt9YM1sJH1hjdq=h230"]
|
|
32
33
|
end
|
|
33
34
|
end
|
|
34
35
|
|
|
@@ -71,6 +72,7 @@ describe 'App' do
|
|
|
71
72
|
result[:website_url].should == 'http://bluefroggaming.com'
|
|
72
73
|
result[:email].should == 'support@hdgames.zendesk.com'
|
|
73
74
|
result[:youtube_video_ids].should == []
|
|
75
|
+
result[:screenshot_urls].should == ["https://lh6.ggpht.com/JJWPKPEvz5ivZEeph_gA_oB3VOXYrIrY9lGdGFWHVT4FVub6cUKqxkh5VyxbvVqMXg=h230", "https://lh6.ggpht.com/kPGbJqu42Ukxoa_XZlWxo349y3zNKCayjBD35V2bbt26ZmgpHDegTf8sS5C1VOoAiw=h230", "https://lh3.ggpht.com/S9VMzKxAWSS3IxeUtLYPn-zDg9ojTpVxeHbd3RhHqtXazGRV6-S0jsuNh-GneV9eE2A=h230", "https://lh5.ggpht.com/G0U5k5PpvuEdflN58qzr3uKHGsXk3QqwwLIL_KxVfGNicR7Gn42smetbTBn9SRftnyk=h230", "https://lh6.ggpht.com/j03lPKqJss6066_Q6AbZikU33PWgoR07cPLFgoE5IoNyXwMG6QVX_3-SgI741vnaVnu7=h230", "https://lh3.ggpht.com/YBrG1Hjv7vgNLwp9PaR77gQHwdpInuluSnq9qPG4BwwU7LItCy4m6RQt9YM1sJH1hjdq=h230"]
|
|
74
76
|
|
|
75
77
|
result
|
|
76
78
|
end
|
|
@@ -96,6 +98,7 @@ describe 'App' do
|
|
|
96
98
|
result[:website_url].should == 'http://www.evernote.com'
|
|
97
99
|
result[:email].should == nil
|
|
98
100
|
result[:youtube_video_ids].should == ['Ag_IGEgAa9M']
|
|
101
|
+
result[:screenshot_urls].should == ["https://lh3.ggpht.com/Q_vPAtKVUefD3znGi_8AnK3FHDf8XsegMnVrX2sImaFLKXOC__MWKXW2WY1avhlvF_aK=h230", "https://lh6.ggpht.com/nbz5tSvuuydrcQ5kl2PpaFuPBrEgXRPaEXXecLMNXEGVblUlDoTXCRH22GrM2RYFcA=h230", "https://lh3.ggpht.com/Oi0lpkA23XsHjg_cXyXkOaRtNw84_OR_YtzhZUCe8VhWRej8oCT28I0VD8Z5ixSuCyM=h230", "https://lh4.ggpht.com/EfNdIkRr5T0JQQlvPICl6m3gHCDBEnsMxqZMrXb0qMW9xBQCN10PaPdrKVI-07XzsXs=h230", "https://lh4.ggpht.com/Q4BDQRkuvHMglh5I0aG56Yy_29NnBWxXWTqkv21onHM41pnrHoLnkacQFmqr6SVtuUR4=h230", "https://lh3.ggpht.com/Uf4MqnyMPVEFATlkutnXVyBtUQEkJbBLQREXbBI633wHAeBxhAc2-XSuysMM5ZFC7f7j=h230", "https://lh5.ggpht.com/TFSxb_0qi1RcDLI6ezzpB5yYfk8rqYWvDjmE30z6AGdmeVSsmomlmGAW0aT8yCA0jpk0=h230", "https://lh4.ggpht.com/Zeet2wggJms4BpDTglJP0jW9M3EAjpn0zUWNKZk6YKM9Id4SPBID5LtKJAgd-krtXZ8=h230"]
|
|
99
102
|
end
|
|
100
103
|
|
|
101
104
|
it 'should populate a hash with the correct keys/values' do
|
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.5.
|
|
4
|
+
version: 0.5.1
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-06-
|
|
12
|
+
date: 2012-06-14 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: typhoeus
|
|
@@ -205,7 +205,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
205
205
|
version: '0'
|
|
206
206
|
segments:
|
|
207
207
|
- 0
|
|
208
|
-
hash:
|
|
208
|
+
hash: -2224645919315098821
|
|
209
209
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
210
210
|
none: false
|
|
211
211
|
requirements:
|