qunar 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/qunar/hotel.rb +6 -1
- data/lib/qunar/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 725fb450ecbc035f72a397dfb047ac2b48f45fa1
|
4
|
+
data.tar.gz: 6509a4004ad273c928d520ca69e01e0ad574e4f3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2743710e646d95b80a71791e39e8043472387366a401fb014be1c22b7b2af6473703498aae76d350268e13d3153fa8a052c8a158a70963ad850a4419f9916d12
|
7
|
+
data.tar.gz: 43796586966ada8b46f986f11d6379e7a6208a3964650fe5e7868c055aa67bd69a95e0983bec2345572862f178b4579297801460caf7749b99c77ca5c07913cb
|
data/lib/qunar/hotel.rb
CHANGED
@@ -15,7 +15,12 @@ module Qunar
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def name #get the name of the hotel
|
18
|
-
@hotel.search("//div[@class='htl-info fr']//span")
|
18
|
+
name = @hotel.search("//div[@class='htl-info fr']//span")
|
19
|
+
if name.empty?
|
20
|
+
name = '该酒店不存在'
|
21
|
+
else
|
22
|
+
name = name.first.text.strip
|
23
|
+
return name
|
19
24
|
end
|
20
25
|
|
21
26
|
def star #get the level of the hotel
|
data/lib/qunar/version.rb
CHANGED