dmg_android_api 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f00475c072f0b51f86bf9a47fabccbdde1aeed92
4
- data.tar.gz: 9227bd5ee02738b4019c7dc2b0af8bff85c5332e
3
+ metadata.gz: 47060a07124a9c0e55468446ff586d37bb06ebf7
4
+ data.tar.gz: 35bf6e6c3896b4cccc480b7bbb1bb4c2fa68caf9
5
5
  SHA512:
6
- metadata.gz: 3787fe315a5766ea665e39d365ace862f6af3e5010ef1e474910b1bd3bfb11186be5489841856425799c6a9960220acf03a44e3865da27c3957f4c2019ac03f9
7
- data.tar.gz: a9ee189e59a4a8b0ebc971a63a08c19144598dcd946db6ed58bfee4969dc8a50a7a22b993372b144fa45a9cdd95ad415a651bc41bc1ff6722fc8f74ef1306549
6
+ metadata.gz: bcf54cfc7eed4286ec026da5d5c8a5eedb306e9847f0f7e0787c5d24e3557b5c1374258cee9f6ddb888306c0f683f9161df9d210f8f81bceb23df6ad978fadc8
7
+ data.tar.gz: 5926685f44fe950a2a4b32bded0a74d32a8fda414b92f51cd643322f6120de0709cdd318fec1a920e91256659c7c4e42b75dc13635c95d4db6a07fc1aa1d9cb6
@@ -59,6 +59,15 @@ module DmgAndroidApi
59
59
  result[:users_also_installed] = []
60
60
  result[:related] = []
61
61
 
62
+ price_info = doc.css('.buy-button-container.apps.medium.play-button')
63
+
64
+ price_span = price_info.css('meta[itemprop="price"]')
65
+
66
+ if price_span.attributes['content'].text == 'Free'
67
+ result[:price] = '0'
68
+ else
69
+ result[:price] = price_span.attributes['content'].text
70
+ end
62
71
  if similar_elem = doc.css('.doc-similar').first
63
72
  similar_elem.children.each do |similar_elem_child|
64
73
  assoc_app_type = similar_elem_child.attributes['data-analyticsid'].text
@@ -18,7 +18,7 @@ module DmgAndroidApi
18
18
  doc = Nokogiri::HTML(html)
19
19
  doc.css('.card').each do |snippet_node|
20
20
  result = {}
21
-
21
+
22
22
  details_node = snippet_node.css('.details')
23
23
 
24
24
 
@@ -1,3 +1,3 @@
1
1
  module DmgAndroidApi
2
- VERSION = "0.0.4"
2
+ VERSION = "0.0.5"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dmg_android_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nhat Anh Nguyen
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-07-17 00:00:00.000000000 Z
11
+ date: 2013-07-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler