dmm-crawler 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +3 -0
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +2 -2
- data/lib/dmm-crawler/attributes.rb +9 -1
- data/lib/dmm-crawler/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: aba2948c3273dec948c8e9f0f0515216964ab5b6
|
4
|
+
data.tar.gz: 6bdba93682fc12536ba834713e51ee46c6e44da4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f45423ca87487b80f2b5b5e0599c5e2c6c77c5de9e09b01a7ff3b84e7d3428b13397eae121ca65a995ddef223959359d8518ee464f27ab8734f2e56c2d30cfb2
|
7
|
+
data.tar.gz: 623fd1aa88cb58498fd46dbead4470e330fb89a17de23a311306ae7749dad827a8a4ee05d544b233141ce7b098dfb12eea3858af1b22af020d43361b0be3a4a7
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -79,7 +79,15 @@ module DMMCrawler
|
|
79
79
|
keys = extract_text(@element.search('.m-productInformation .productInformation__item .informationList__ttl'))
|
80
80
|
values = extract_text(@element.search('.m-productInformation .productInformation__item .informationList__txt'))
|
81
81
|
|
82
|
-
keys.zip(values)
|
82
|
+
information = keys.zip(values)
|
83
|
+
series = information.find { |array| array.first == 'シリーズ' }
|
84
|
+
|
85
|
+
if series
|
86
|
+
information = information.select { |array| array.first != 'シリーズ' }
|
87
|
+
information.push(series)
|
88
|
+
end
|
89
|
+
|
90
|
+
information.map { |key, value| { key: key, value: value } }
|
83
91
|
end
|
84
92
|
|
85
93
|
def extract_text(elements)
|
data/lib/dmm-crawler/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dmm-crawler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Satoshi Ohmori
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-06-
|
11
|
+
date: 2017-06-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mechanize
|