dmm-crawler 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/README.md +1 -6
- data/doc/ja/README.md +1 -6
- data/lib/dmm-crawler/ranking.rb +3 -3
- data/lib/dmm-crawler/version.rb +1 -1
- data/spec/dmm-crawler/ranking_spec.rb +2 -2
- 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: c9d942f72d5f46c76cc3ea64fac5d14e75f3b64c
|
4
|
+
data.tar.gz: 91d5c2006978748f4a6ae4e5f44dab749b29c887
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d19da3e0904770f3124dbb5e543340c37b8ee7b39962df3ec9d83562f5faaf26c92c7bda5821b341fe4e2f0cb922740024cb7d165e039a3b18c034a12c57b9cb
|
7
|
+
data.tar.gz: d594e9f254168304b4330096c2a440d967206bc3757ead9eb500f9e4771ce964afc182aa1241c8f14dde3310b76821f872c3c681fda4fa0f1fa39ff8a7c8bec9
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
data/doc/ja/README.md
CHANGED
data/lib/dmm-crawler/ranking.rb
CHANGED
@@ -9,8 +9,8 @@ module DMMCrawler
|
|
9
9
|
@agent = Agent.new.agent
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
13
|
-
|
12
|
+
def arts
|
13
|
+
arts = page.search('.rank-rankListItem.fn-setPurchaseChange').map do |element|
|
14
14
|
[
|
15
15
|
element.search('.rank-name').first.text.strip,
|
16
16
|
element.search('img').last.attributes['src'].value,
|
@@ -19,7 +19,7 @@ module DMMCrawler
|
|
19
19
|
]
|
20
20
|
end
|
21
21
|
|
22
|
-
|
22
|
+
arts.map.with_index(1) { |(title, image, url, tags), rank| { title: "#{rank}位: #{title}", url: url, image_url: image, tags: tags } }
|
23
23
|
end
|
24
24
|
|
25
25
|
private
|
data/lib/dmm-crawler/version.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
describe DMMCrawler::Ranking do
|
2
|
-
let(:attachments) { described_class.new(arguments).
|
2
|
+
let(:attachments) { described_class.new(arguments).arts }
|
3
3
|
|
4
4
|
let(:submedia) { 'cg' }
|
5
5
|
let(:arguments) { { submedia: submedia, term: term } }
|
6
6
|
|
7
|
-
describe '#
|
7
|
+
describe '#arts' do
|
8
8
|
after { sleep 2 }
|
9
9
|
|
10
10
|
context 'with length' do
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
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.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Satoshi Ohmori
|
@@ -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.6.
|
142
|
+
rubygems_version: 2.6.12
|
143
143
|
signing_key:
|
144
144
|
specification_version: 4
|
145
145
|
summary: Show DMM and DMM.R18's crawled data
|