hotel_price 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.DS_Store +0 -0
- data/Gemfile.lock +1 -1
- data/lib/.DS_Store +0 -0
- data/lib/hotel_price/jalan/jalan_api.rb +0 -1
- data/lib/hotel_price/jalan/jalan_scraper.rb +0 -1
- data/lib/hotel_price/rakuten/rakuten_api.rb +1 -4
- data/lib/hotel_price/rakuten/rakuten_console.rb +1 -1
- data/lib/hotel_price/version.rb +1 -1
- data/lib/hotel_price.rb +1 -1
- metadata +3 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a89f55a297a504a6e9dc86a123dd336b5e762618f574a6b24749cfcfe394df00
|
4
|
+
data.tar.gz: 71eb4e9956b772b38316bc6ccf733146879417088cb28cc6f9ffde6984d0bc5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 56468f07606b0c207a96520a41ce403f45318ea0210482052993d0fd740a9008db83a7a0fb2eaa6f65ef53fd5b9c251fa1e01283313a29b03a5c255116c73b5f
|
7
|
+
data.tar.gz: dfa6d6f5f2f789ff86819a4b5e2d42dd303f79d090f302d8dcd698c2279566a5d5a13d209bcd972bab1f71263f23f079ae5c8483d440204dee5ac3c403a5d715
|
data/.DS_Store
ADDED
Binary file
|
data/Gemfile.lock
CHANGED
data/lib/.DS_Store
ADDED
Binary file
|
@@ -15,7 +15,6 @@ module HotelPrice::Jalan
|
|
15
15
|
|
16
16
|
def get_min_price params
|
17
17
|
url = "http://jws.jalan.net/APIAdvance/StockSearch/V1/?key=#{@config[:jalan_api_key]}&h_id=#{@config[:jalan_hotel_id]}&stay_date=#{params[:checkin_date]}&stay_count=1&adult_num=#{params[:adult_num]}&count=1"
|
18
|
-
puts url
|
19
18
|
doc = Nokogiri::XML(open(url))
|
20
19
|
if doc.css("NumberOfResults").text == "0"
|
21
20
|
{
|
@@ -5,7 +5,6 @@ module HotelPrice::Jalan
|
|
5
5
|
|
6
6
|
query_string = make_query_string(checkin_date.to_s, num_adults)
|
7
7
|
url = "https://www.jalan.net/yad#{jalan_hotel_id}/plan/?screenId=UWW3101&yadNo=#{jalan_hotel_id}&#{query_string}"
|
8
|
-
puts url
|
9
8
|
driver = HotelPrice.get_selenium_driver mode
|
10
9
|
driver.get(url)
|
11
10
|
sleep 2
|
@@ -165,11 +165,9 @@ module HotelPrice::Rakuten
|
|
165
165
|
|
166
166
|
def get_area_rank
|
167
167
|
body = get_page_num
|
168
|
-
puts body
|
169
168
|
(1..body[:page_num]).each do |i|
|
170
169
|
body[:page_num] = i
|
171
170
|
rank = search_ranking(body)
|
172
|
-
puts rank
|
173
171
|
return rank if rank[:status] == "found"
|
174
172
|
end
|
175
173
|
{ status: "not_found" }
|
@@ -180,8 +178,7 @@ module HotelPrice::Rakuten
|
|
180
178
|
middle_class_code: params[:middle_class_code],
|
181
179
|
small_class_code: params[:small_class_code],
|
182
180
|
detail_class_code: params[:detail_class_code],
|
183
|
-
page_num: params[:page_num]
|
184
|
-
area_name: params[:area_name]
|
181
|
+
page_num: params[:page_num]
|
185
182
|
}
|
186
183
|
url = "https://app.rakuten.co.jp/services/api/Travel/SimpleHotelSearch/20170426?applicationId=#{@config[:rakuten_api_key]}&largeClassCode=japan&middleClassCode=#{body[:middle_class_code]}&smallClassCode=#{body[:small_class_code]}&detailClassCode=#{body[:detail_class_code]}&page=#{body[:page_num]}"
|
187
184
|
uri = URI.parse(url)
|
@@ -9,7 +9,7 @@ module HotelPrice::Rakuten
|
|
9
9
|
mode: params[:mode] ||= 0
|
10
10
|
}
|
11
11
|
@wait = Selenium::WebDriver::Wait.new(timeout: 100)
|
12
|
-
@driver =
|
12
|
+
@driver = HotelPrice.get_selenium_driver @config[:mode]
|
13
13
|
if @config[:chain]
|
14
14
|
go_to_management_page_chain
|
15
15
|
else
|
data/lib/hotel_price/version.rb
CHANGED
data/lib/hotel_price.rb
CHANGED
@@ -42,7 +42,7 @@ module HotelPrice
|
|
42
42
|
case mode
|
43
43
|
when 1
|
44
44
|
firefox_capabilities = Selenium::WebDriver::Remote::Capabilities.firefox
|
45
|
-
Selenium::WebDriver.for(:remote, url: "http://
|
45
|
+
Selenium::WebDriver.for(:remote, url: "http://hub:4444/wd/hub", desired_capabilities: firefox_capabilities)
|
46
46
|
when 2
|
47
47
|
Selenium::WebDriver.for :firefox
|
48
48
|
else
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fumitake Kawasaki
|
@@ -118,6 +118,7 @@ executables:
|
|
118
118
|
extensions: []
|
119
119
|
extra_rdoc_files: []
|
120
120
|
files:
|
121
|
+
- ".DS_Store"
|
121
122
|
- ".gitignore"
|
122
123
|
- ".rspec"
|
123
124
|
- ".rubocop.yml"
|
@@ -132,6 +133,7 @@ files:
|
|
132
133
|
- bin/setup
|
133
134
|
- exe/hotel_price
|
134
135
|
- hotel_price.gemspec
|
136
|
+
- lib/.DS_Store
|
135
137
|
- lib/hotel_price.rb
|
136
138
|
- lib/hotel_price/agoda.rb
|
137
139
|
- lib/hotel_price/agoda/agoda_api.rb
|