qunar 0.0.27 → 0.0.29

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: fe6a1e6d072c39608b9c60fb1780c161529cd077
4
- data.tar.gz: dbbaffcb34e7191c859d9032c788bd5cb2c74c5f
3
+ metadata.gz: 41fc2c2ce8c2db8d7ee3a398c5c0fba4b651fe37
4
+ data.tar.gz: e5245046be9da4bb594afad1849f1d09cd34a556
5
5
  SHA512:
6
- metadata.gz: ef8d632b88ec10f5749efc4c96e8afd8682f236f272f9425cdf2a4a7d30c26f59403a1a3055f52b11973297ab8f294b1c33df788de434e7c626145b76285baae
7
- data.tar.gz: 0aee015e9f22ff5fea9dc2d80e18e3a5fb8e43f58d32e5ef944307f21aed5ce337c36430d7177193ac8fa931e1f4c6508ea8417e0b7fde0dd58637ca8e5be11a
6
+ metadata.gz: 896dcad67755096348af57505ca6bb6660b4cffcb1b9124ccf15983cb36672e5b8148d88a267d6b962ac106c0fca2093c083a390976d0a4895f35d1b9868ed40
7
+ data.tar.gz: 7969b139f946154408966153af37dbd4cc097c2299c93fe3e7d5e390da750e97328ceff2514d24b6b2653277d18c4cee92cd1a1c10c6cc7e59b0e6afe3f1b8ad
data/lib/qunar/rank.rb CHANGED
@@ -82,15 +82,21 @@ module Qunar
82
82
  otas['insurance'] = insurance
83
83
 
84
84
  coupon = row.search("span[@class='fan']/em[@class='pr']").first
85
-
86
85
  if coupon == nil
87
86
  coupon = 0
88
87
  else
89
88
  coupon = coupon.text.sub(/¥/,'').strip.to_i
90
89
  end
91
-
92
90
  otas['coupon'] = coupon
93
91
 
92
+ reduce = row.search("span[@class='fan lapse']/em[@class='pr']").first
93
+ if reduce == nil
94
+ reduce = 0
95
+ else
96
+ reduce = reduce.text.sub(/¥/,'').strip.to_i
97
+ end
98
+ otas['reduce'] = reduce
99
+
94
100
  reserve_detail = row.search("div[@class='clrfix order-detail']").first.text.strip
95
101
  otas['reserve_detail'] = reserve_detail
96
102
 
@@ -102,10 +108,12 @@ module Qunar
102
108
  end
103
109
  otas['prepay'] = prepay
104
110
 
105
- price = row.search("p[@class='final-price ']/b").first.text.strip
106
- otas['price'] = price.to_i
107
111
 
112
+
113
+ price = row.search("p[@class='final-price ']/b").first.text.strip
108
114
  neat_price = row.search("p[@class='count_pr']").first.children[1].to_s
115
+
116
+ otas['price'] = price.to_i
109
117
  otas['neat_price'] = neat_price.to_i
110
118
 
111
119
  room['otas'] << otas
data/lib/qunar/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Qunar
2
- VERSION = "0.0.27"
2
+ VERSION = "0.0.29"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: qunar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.27
4
+ version: 0.0.29
5
5
  platform: ruby
6
6
  authors:
7
7
  - JusticeChow
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-08-04 00:00:00.000000000 Z
11
+ date: 2014-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler