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 +4 -4
- data/lib/hotel_price/rakuten/rakuten_scraper.rb +13 -0
- 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: 18be587d9531136a96b3e63ffd45bf0b090db763493b7ee86e6eaebc92787c6e
|
4
|
+
data.tar.gz: 9603ebc5f307f96657ed64a1d8cf278b176dca583a6891314b9391e759153d62
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
}
|
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.3.
|
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-
|
12
|
+
date: 2020-03-18 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: bundler
|