dmm-crawler 0.2.6 → 0.2.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a63c5c9dd8d6e46df1f00d53eaa4f0cd95b2bffcd2406f155bd582eb864d9cb8
4
- data.tar.gz: 16d93c3d3806d8a87abff9e53ec2c89403a8b2fd492d513aa8da947195d5e2da
3
+ metadata.gz: 18b44134e22ed066117f64c8de14c3d8b460da0cc107737384fc63e619ca1576
4
+ data.tar.gz: ea76fffeed4b683705556b5c8506bfd5d0b1d728b090cd0bf48d62c3167ffb14
5
5
  SHA512:
6
- metadata.gz: 3232d0428c2d8a2211412c850a2d1a0f6b03dcd5ffd0097ba0ed366cb8b875b734ddc0c3c6966ee21d3efc334e163506869a443417e1dbba8701715bd3b97a0f
7
- data.tar.gz: 749b25cc7e6bc4038f873de594f8ffe0fc8fb292c177fa717eb64c2a1907ec68104f08c2a5e023f12ba18445f564c7557c21a8580d8edc62d5004736cfa76c89
6
+ metadata.gz: 1302f022bf9769fe4b25fe17a4ae0bdef2a19c715ea57e59893c4e78778a7192dc36fd7feb9e298ca5c98f7efd612762e5fb78f9a2ac4a8487ae425ce5fe6722
7
+ data.tar.gz: a1ad3ce32a7558e602a9a4be85fc2cdcb7ce781873f32465d64ea7da82b9df376cb74fb6361f9a0f08b6c40ed653d994a3f08abd0a5b832a13371aab67a963c3
@@ -1,5 +1,8 @@
1
1
  # Change logs
2
2
 
3
+ ## 0.2.7
4
+ - Make price integer.
5
+
3
6
  ## 0.2.6
4
7
  - Fetch the price of the art.
5
8
 
data/README.md CHANGED
@@ -16,7 +16,7 @@ gem 'dmm-crawler'
16
16
 
17
17
  ## Usage
18
18
 
19
- From the bot in invited Slack's room.
19
+ ### DMM.R18 Doujin Ranking
20
20
 
21
21
  ```ruby
22
22
  require 'dmm-crawler'
@@ -44,10 +44,33 @@ client.rankings(term: '24', submedia: 'cg')
44
44
 
45
45
  For example, Above command will show the doujin cg 24's ranking.
46
46
 
47
- ### Available arguments
47
+ #### Available arguments
48
+
48
49
  - Arguments for the term is able to use `all, comic, cg, game, voice`.
49
50
  - Arguments for the submedia is able to use `24, weekly, monthly, total`.
50
51
 
52
+ ### From an art's URL
53
+
54
+ ```
55
+ require 'dmm-crawler'
56
+
57
+ include DMMCrawler
58
+
59
+ client = Client.new do |agent|
60
+ agent.ignore_bad_chunking = false
61
+ end
62
+
63
+ URL = 'https://www.dmm.co.jp/dc/doujin/-/detail/=/cid=d_087090'
64
+
65
+ client.get_attributes(URL)
66
+ # =>
67
+ # [
68
+ # ...
69
+ # ]
70
+ ```
71
+
72
+ It returns art information by Array.
73
+
51
74
  ## Contributing
52
75
 
53
76
  1. Fork it
@@ -61,9 +61,11 @@ module DMMCrawler
61
61
  end
62
62
 
63
63
  def price
64
- @page
65
- .search('.m-priceList .priceList__sub.priceList__sub--big')
66
- .text.strip.delete('円,')
64
+ Integer(
65
+ @page
66
+ .search('.m-priceList .priceList__sub.priceList__sub--big')
67
+ .text.strip.delete('円,')
68
+ )
67
69
  end
68
70
 
69
71
  def author
@@ -1,3 +1,3 @@
1
1
  module DMMCrawler
2
- VERSION = '0.2.6'.freeze
2
+ VERSION = '0.2.7'.freeze
3
3
  end
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.2.6
4
+ version: 0.2.7
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-03-25 00:00:00.000000000 Z
11
+ date: 2018-04-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize