hotel_price 0.3.7 → 0.3.8

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
  SHA256:
3
- metadata.gz: a7575771cadfd2c8287586933ae0a42c57baa62718fa3a033b67e47f4624a3b3
4
- data.tar.gz: f3ba187599e25bfcaf97b68f2821ec612830190a182c32ff50bb2ab2acd9af0b
3
+ metadata.gz: a22861f4708dba324ef8f028527961fefb087435821d853e95f88dbe9083ebd5
4
+ data.tar.gz: 28dbdcad4bef039222ca579cb4bb4a2cb8e111aad37653991666b65287ca6517
5
5
  SHA512:
6
- metadata.gz: 609a68eba4918882cf2919298b34f9eb6fb55c57399da7ee4f2fe97cf766505a0fe7626aa5a8ad3e4cc63084a47748d593bb842ed6ae24f5df63a4981a425d2e
7
- data.tar.gz: 762bf55a15ba7782e86d257d6a35f56dd314817922f612387725e79a12066981a6a484371a2d5d4c0f25210f00a881dfbb7a9756b87e5e54ecc1ad7d356b0c7c
6
+ metadata.gz: 4c415172a89791a5ab6f469b0ef9c726333d065c411abae4a8490c2edfddd4356f4f38765f3024be89d9e3298d60de5117370503331c51b963176608cb941a77
7
+ data.tar.gz: 8f177c1d244c7557b0f64533d66a092b864394586388df5f00048b63ce60899c074e36ed11077f7ff5e15e968fb4bdb1496a7584424c8beba072dfb9bb4efb5a
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- hotel_price (0.3.6)
4
+ hotel_price (0.3.7)
5
5
  activesupport (~> 6.0.2.1)
6
6
  json (~> 2.3.0)
7
7
  nokogiri (~> 1.10.9)
@@ -45,7 +45,7 @@ GEM
45
45
  childprocess (>= 0.5, < 4.0)
46
46
  rubyzip (>= 1.2.2)
47
47
  thread_safe (0.3.6)
48
- tzinfo (1.2.6)
48
+ tzinfo (1.2.7)
49
49
  thread_safe (~> 0.1)
50
50
  zeitwerk (2.3.0)
51
51
 
@@ -10,7 +10,7 @@ module HotelPrice::Rakuten
10
10
  options = Selenium::WebDriver::Firefox::Options.new
11
11
  options.add_argument("-headless")
12
12
  @wait = Selenium::WebDriver::Wait.new(:timeout => 100)
13
- @driver = Selenium::WebDriver.for :firefox#, options: options
13
+ @driver = Selenium::WebDriver.for :firefox, options: options
14
14
  if @config[:chain]
15
15
  go_to_management_page_chain
16
16
  else
@@ -49,6 +49,18 @@ module HotelPrice::Rakuten
49
49
  plan_num.size
50
50
  end
51
51
 
52
+ def self.get_dayuse_plan_num rakuten_hotel_id
53
+ driver = self.get_selenium_driver
54
+ driver.get "https://hotel.travel.rakuten.co.jp/hotelinfo/plan/#{rakuten_hotel_id}"
55
+ sleep 10
56
+ driver.find_element(:id, "du-radio").click
57
+ driver.find_element(:id, "dh-submit").click
58
+ sleep 10
59
+ plan_num = driver.find_elements(:class, "planThumb")
60
+ driver.quit
61
+ plan_num.size
62
+ end
63
+
52
64
  def self.get_selenium_driver
53
65
  # firefox_capabilities = Selenium::WebDriver::Remote::Capabilities.firefox
54
66
  # @driver = Selenium::WebDriver.for(:remote, url: "http://hub:4444/wd/hub", desired_capabilities: firefox_capabilities)
@@ -1,3 +1,3 @@
1
1
  module HotelPrice
2
- VERSION = "0.3.7"
2
+ VERSION = "0.3.8"
3
3
  end
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.3.7
4
+ version: 0.3.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fumitake Kawasaki