dmm-crawler 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +3 -0
- data/Gemfile.lock +1 -1
- data/lib/dmm-crawler/ranking.rb +10 -1
- data/lib/dmm-crawler/version.rb +1 -1
- data/spec/dmm-crawler/ranking_spec.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 99738f48c076aa4e2569f97fab7c9ad20500aa0f
|
4
|
+
data.tar.gz: aaa5cf428459e5310449a03cfce45fcf87310de9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58ca9321e140ba4327b2e9d49a062fe37a23a0c0feeb2d8c914054f1f9888fb151ffa6e87f3977268f63c3e024ad380275c011107b99f9189f70474a83600162
|
7
|
+
data.tar.gz: f8b08887860332a742ab5301edaf48361a72e2cd85da2e6a7e5a915978e00712c65600f64e00d1e0791cae3ce1102f0d7f495b2512e140518bd27e30d92ce9f3
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/dmm-crawler/ranking.rb
CHANGED
@@ -15,11 +15,20 @@ module DMMCrawler
|
|
15
15
|
element.search('.rank-name').first.text.strip,
|
16
16
|
element.search('img').last.attributes['src'].value,
|
17
17
|
"#{BASE_URL}#{element.search('.rank-name').first.search('a').first.attributes.first[1].value}",
|
18
|
+
element.search('.rank-desc').text,
|
18
19
|
element.search('.rank-labelListItem').map { |e| e.search('a').text.strip }
|
19
20
|
]
|
20
21
|
end
|
21
22
|
|
22
|
-
arts.map.with_index(1)
|
23
|
+
arts.map.with_index(1) do |(title, image_url, title_link, description, tags), rank|
|
24
|
+
{
|
25
|
+
title: "#{rank}位: #{title}",
|
26
|
+
title_link: title_link,
|
27
|
+
image_url: image_url,
|
28
|
+
description: description,
|
29
|
+
tags: tags
|
30
|
+
}
|
31
|
+
end
|
23
32
|
end
|
24
33
|
|
25
34
|
private
|
data/lib/dmm-crawler/version.rb
CHANGED
@@ -21,7 +21,7 @@ describe DMMCrawler::Ranking do
|
|
21
21
|
let(:term) { '24' }
|
22
22
|
|
23
23
|
it { is_expected.not_to be_empty }
|
24
|
-
it { is_expected.to all(include(:title, :title_link, :image_url, :tags)) }
|
24
|
+
it { is_expected.to all(include(:title, :title_link, :image_url, :description, :tags)) }
|
25
25
|
end
|
26
26
|
|
27
27
|
context 'with not registered argument' do
|
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.0.
|
4
|
+
version: 0.0.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: 2017-05-
|
11
|
+
date: 2017-05-20 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: mechanize
|
@@ -139,7 +139,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
139
139
|
version: '0'
|
140
140
|
requirements: []
|
141
141
|
rubyforge_project:
|
142
|
-
rubygems_version: 2.
|
142
|
+
rubygems_version: 2.5.1
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Show DMM and DMM.R18's crawled data
|