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 +4 -4
- data/lib/qunar/rank.rb +12 -4
- data/lib/qunar/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 41fc2c2ce8c2db8d7ee3a398c5c0fba4b651fe37
|
4
|
+
data.tar.gz: e5245046be9da4bb594afad1849f1d09cd34a556
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
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.
|
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-
|
11
|
+
date: 2014-08-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|