dmm-crawler 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/CHANGELOG.md +3 -0
- data/README.md +0 -1
- data/lib/dmm-crawler/attributes.rb +0 -11
- data/lib/dmm-crawler/ranking.rb +1 -2
- data/lib/dmm-crawler/version.rb +1 -1
- data/spec/dmm-crawler/ranking_spec.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: b9e097c2a504bd209610b13b88938419591d646bc58dc666e7780c19f2d252e4
|
4
|
+
data.tar.gz: 8c3be56018b75796857bfedf8dbbb7a130bf166013a2d813a5b98a9b03b19942
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9c67e16b9a629013b113d2e838b8f8793c25fc07ee86feb41738a4243e7ffb46f1931a0aea3065f48707e78bc6135665c0f2d441b7f75424dc9d1db9346de8ea
|
7
|
+
data.tar.gz: ea408fcf68c7c12ced8c2426d5a248ee1acbefb671cc1c5391a56d22443571531ff8a4e6197d06061d7077a9049965dddcfd81473becc7e476e66dcc2d0b567c
|
data/CHANGELOG.md
CHANGED
data/README.md
CHANGED
@@ -15,7 +15,6 @@ module DMMCrawler
|
|
15
15
|
submedia,
|
16
16
|
author,
|
17
17
|
informations,
|
18
|
-
price,
|
19
18
|
affiliateable?,
|
20
19
|
tags
|
21
20
|
]
|
@@ -64,16 +63,6 @@ module DMMCrawler
|
|
64
63
|
.delete('-')
|
65
64
|
end
|
66
65
|
|
67
|
-
def price
|
68
|
-
price = @page.search('.priceList__main').text.strip.delete('円,')
|
69
|
-
|
70
|
-
if price.empty?
|
71
|
-
Integer(@page.search('.priceList__main').text.strip.delete('円,'))
|
72
|
-
else
|
73
|
-
Integer(price)
|
74
|
-
end
|
75
|
-
end
|
76
|
-
|
77
66
|
def author
|
78
67
|
@page.search('div.circleName__item').text.strip
|
79
68
|
end
|
data/lib/dmm-crawler/ranking.rb
CHANGED
@@ -15,7 +15,7 @@ module DMMCrawler
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
-
arts.map.with_index(1) do |(title, title_link, image_url, submedia, author, informations,
|
18
|
+
arts.map.with_index(1) do |(title, title_link, image_url, submedia, author, informations, affiliateable, tags), rank|
|
19
19
|
{
|
20
20
|
title: title,
|
21
21
|
title_link: title_link,
|
@@ -24,7 +24,6 @@ module DMMCrawler
|
|
24
24
|
author: author,
|
25
25
|
informations: informations,
|
26
26
|
rank: rank,
|
27
|
-
price: price,
|
28
27
|
affiliateable: affiliateable,
|
29
28
|
tags: tags
|
30
29
|
}
|
data/lib/dmm-crawler/version.rb
CHANGED
@@ -19,7 +19,7 @@ describe DMMCrawler::Ranking do
|
|
19
19
|
let(:attachments) { described_class.new(arguments).arts }
|
20
20
|
let(:term) { '24' }
|
21
21
|
|
22
|
-
it { is_expected.to all(include(:title, :title_link, :image_url, :submedia, :author, :informations, :rank, :
|
22
|
+
it { is_expected.to all(include(:title, :title_link, :image_url, :submedia, :author, :informations, :rank, :affiliateable, :tags)) }
|
23
23
|
it { is_expected.to all(satisfy { |art| art.all? { |_k, v| v != '' } }) }
|
24
24
|
end
|
25
25
|
|
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.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Satoshi Ohmori
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-
|
11
|
+
date: 2018-08-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rdmm
|