hotel_price 0.3.4 → 0.3.5

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: 38a5082a8fd046c92eb5b3e7f68c0a51c2abdd25f5516950ef5e547296d11404
4
- data.tar.gz: 58606a57adfe1fb211af3ab18898ab2b476a4b39e8c027cb4a1dae00073df2b6
3
+ metadata.gz: 18be587d9531136a96b3e63ffd45bf0b090db763493b7ee86e6eaebc92787c6e
4
+ data.tar.gz: 9603ebc5f307f96657ed64a1d8cf278b176dca583a6891314b9391e759153d62
5
5
  SHA512:
6
- metadata.gz: 6dc57df83893d7a9b0da3569ae360542939faf3560dfc4bb4a958aa196c16b8b4311deae4993fef2521fe0ec99e17e40ba1ed14f6ad9d9e66a8ab70c6b4b9b92
7
- data.tar.gz: d1c98ae6a1afdd17b367303a080617905b94ff91b3d2b49f038f370afebf097405d98f9cab799884c90d3a48bf55c850c556b8636ab3298c9c1c520d34e163dc
6
+ metadata.gz: 78f5c66d5c3551e804e95f12caafd83553039c7b38c3d83812d6bbd8661fd38bf14e5d29502cd5c1165d552a6708c6765cc2921cba54f432e5ebd0723e0393c0
7
+ data.tar.gz: 7a75882ea23c2ff188bc0df1c808b6905951094adea7a102c341298004425c8dd1b5154d36469ca807ee8224b7b88d702b9f8afeb997f57bbb9728f75c09d45f
@@ -6,8 +6,21 @@ module HotelPrice::Rakuten
6
6
  sleep 2
7
7
  comment_area = driver.find_elements(:class_name, "commentBox")
8
8
  data = comment_area.map do |f|
9
+ if f.find_element(class_name: "user").text.include?("投稿者さん")
10
+ username = f.find_element(class_name: "user").text
11
+ generation = 0
12
+ gender = ""
13
+ else
14
+ username = f.find_element(class_name: "user").text.match(/(^.+ )/).to_s.strip
15
+ generation = f.find_element(class_name: "user").text.match(/\[.+代/).to_s.gsub("[","").gsub("代", "")
16
+ gender = f.find_element(class_name: "user").text.match(/\/../).to_s.gsub("/", "")
17
+ end
9
18
  {
10
19
  date: f.find_element(class_name: "time").text,
20
+ rate: f.find_element(class_name: "rate").text,
21
+ username: username,
22
+ generation: generation,
23
+ gender: gender,
11
24
  rakuten_hotel_id: rakuten_hotel_id,
12
25
  comment: f.find_element(class_name: "commentSentence").text
13
26
  }
@@ -1,3 +1,3 @@
1
1
  module HotelPrice
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
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.4
4
+ version: 0.3.5
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-03-08 00:00:00.000000000 Z
12
+ date: 2020-03-18 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler