dmm-crawler 0.2.7 → 0.3.0

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: 18b44134e22ed066117f64c8de14c3d8b460da0cc107737384fc63e619ca1576
4
- data.tar.gz: ea76fffeed4b683705556b5c8506bfd5d0b1d728b090cd0bf48d62c3167ffb14
3
+ metadata.gz: 887f658de6263664d744fd096a8863a9e404d2ba239f0a9780cba03837c1feda
4
+ data.tar.gz: 26c85a3bfaf5ab705ae521fcb8487b0266240823ee2e8247b89c84d821062270
5
5
  SHA512:
6
- metadata.gz: 1302f022bf9769fe4b25fe17a4ae0bdef2a19c715ea57e59893c4e78778a7192dc36fd7feb9e298ca5c98f7efd612762e5fb78f9a2ac4a8487ae425ce5fe6722
7
- data.tar.gz: a1ad3ce32a7558e602a9a4be85fc2cdcb7ce781873f32465d64ea7da82b9df376cb74fb6361f9a0f08b6c40ed653d994a3f08abd0a5b832a13371aab67a963c3
6
+ metadata.gz: 77969cb4ee34c406882e433fb8fda0f4e9e226bdc761922fa4d2de772fd80b4abab321f733069a6d2329a854d564f20bb376c9e28bb2a171592ddb0b86ebe0e1
7
+ data.tar.gz: 631a047f8ae2adbafd72039f00ea2e637bb113a105ffbb3f61604754373c150b07ebc6e3e941b12b560a5b45312fbafa90155a8a3c69b781d257c72907db9c9a
@@ -1,5 +1,10 @@
1
1
  # Change logs
2
2
 
3
+ ## 0.3.0
4
+ ### Critical Bug Fix
5
+ - Fix a bug where sub price is not found
6
+ - If sub price is not found, Integer can't parse argument because it's String.
7
+
3
8
  ## 0.2.7
4
9
  - Make price integer.
5
10
 
@@ -61,11 +61,13 @@ module DMMCrawler
61
61
  end
62
62
 
63
63
  def price
64
- Integer(
65
- @page
66
- .search('.m-priceList .priceList__sub.priceList__sub--big')
67
- .text.strip.delete('円,')
68
- )
64
+ price = @page.search('.priceList__main').text.strip.delete('円,')
65
+
66
+ if price.empty?
67
+ Integer(@page.search('.priceList__main').text.strip.delete('円,'))
68
+ else
69
+ Integer(price)
70
+ end
69
71
  end
70
72
 
71
73
  def author
@@ -1,3 +1,3 @@
1
1
  module DMMCrawler
2
- VERSION = '0.2.7'.freeze
2
+ VERSION = '0.3.0'.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.7
4
+ version: 0.3.0
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-04-04 00:00:00.000000000 Z
11
+ date: 2018-04-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize