hotel_price 0.5.6 → 0.5.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/hotel_price.rb +6 -3
- data/lib/hotel_price/jalan/jalan_scraper.rb +2 -1
- data/lib/hotel_price/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7a238e76090c742fb9853184bdc3af2b062bfec971635d7e25944e96ab028b60
|
4
|
+
data.tar.gz: 9f1b26e87a46a327bc66588298d3ad1c599519bbd2ef8a1fc0361970c4f5cc87
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69960789ac56c5f8a08251c7c492dfe6672e3d0925b574c3bc1efb206fb0832b5ecbac7796ba141fe9bbcc12159b1a7720b28aeca5b1ef19360c247080a85403
|
7
|
+
data.tar.gz: 8a4d5c362aae20d2081f1f2945a6418607738578bca532139688234ce9f4b81ecc73c334dd9805394a2efd41ec7c40efc4e6aafce712fe6ff677fc4ccffe2049
|
data/Gemfile.lock
CHANGED
data/lib/hotel_price.rb
CHANGED
@@ -23,7 +23,7 @@ module HotelPrice
|
|
23
23
|
def self.rakuten_travel
|
24
24
|
driver = self.get_selenium_driver
|
25
25
|
rakuten_travel_hotel_id = 128552
|
26
|
-
driver.get("https://travel.rakuten.co.jp/HOTEL/#{rakuten_travel_hotel_id
|
26
|
+
driver.get("https://travel.rakuten.co.jp/HOTEL/#{rakuten_travel_hotel_id}/review.html")
|
27
27
|
sleep 2
|
28
28
|
comment_area = driver.find_elements(:class_name, "commentReputationBoth")
|
29
29
|
comment_area.map do |f|
|
@@ -46,9 +46,12 @@ module HotelPrice
|
|
46
46
|
when 2
|
47
47
|
Selenium::WebDriver.for :firefox
|
48
48
|
else
|
49
|
-
options = Selenium::WebDriver::
|
49
|
+
options = Selenium::WebDriver::Chrome::Options.new
|
50
|
+
options.add_argument("--ignore-certificate-errors")
|
51
|
+
options.add_argument("--disable-popup-blocking")
|
52
|
+
options.add_argument("--disable-translate")
|
50
53
|
options.add_argument("-headless")
|
51
|
-
Selenium::WebDriver.for :
|
54
|
+
Selenium::WebDriver.for :chrome, options: options
|
52
55
|
end
|
53
56
|
end
|
54
57
|
|
@@ -20,9 +20,10 @@ module HotelPrice::Jalan
|
|
20
20
|
plan_name: f.find_element(class_name: "p-planCassette__header").text
|
21
21
|
}
|
22
22
|
rescue StandardError
|
23
|
+
{ date: date, min_price: 0 }
|
23
24
|
end
|
24
25
|
end
|
25
|
-
@price_box.sort_by { |_a, _b, c| c }.reverse.first
|
26
|
+
@price_box.sort_by { |_a, _b, c| c }.reverse.first || { date: date, min_price: 0 }
|
26
27
|
rescue StandardError
|
27
28
|
{ date: date, min_price: 0 }
|
28
29
|
end
|
data/lib/hotel_price/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hotel_price
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fumitake Kawasaki
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2020-04-
|
12
|
+
date: 2020-04-27 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|