dmm-crawler 0.3.2 → 0.3.3

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: 89d7358905407f1b69b7fd11d30d9dfec4138c8d4d346d1ca90e49a1d4e980d2
4
- data.tar.gz: a9cad0a9b99f2a34db97268a5cb8f4de37ed997de4c4681ca973fc1bdc69d29b
3
+ metadata.gz: b6449f249355693b543ef568f92525a4a7748c4d0639085d98950f2d463ba987
4
+ data.tar.gz: 11628215e86cbf6e7c4b2b6758755ca4549ba822dc4881f7269f981601d2af9e
5
5
  SHA512:
6
- metadata.gz: 6b2403e48fe28cb88411e0d1f1f38ca9c8534dc4f84272523b3a8708766b595d13ffd2069ea3b0b91e5436043e53ccce386a59fda2c9581eabc372b3cfc7a2a9
7
- data.tar.gz: 307261250beea53a0800f263b72a9e464a6e1dad60e1bd96551fece0ddcebd019908f372c3226bee2aeec718c5b900d16703825630f806dc2d70c555cc82772e
6
+ metadata.gz: 71e135dc337bfc1055db8f5c8cccf4af60ad8915e242c81a577dd7f2b0e42d4295bad870b27d6c170038fada22e3ee1338bf6163b682993a8a5f83ac8649afb0
7
+ data.tar.gz: 1d270e6c3af7d334e6ed0303728387eb446b1119153c936e0026305c46d03f40074a8005b011870b71f118f026721dd925dbf4e7e9c556a305a111a823e6750f
@@ -1,6 +1,9 @@
1
1
  # Change logs
2
2
 
3
- ## 0.3.1
3
+ ## 0.3.3
4
+ - Fetch first img element from art page.
5
+
6
+ ## 0.3.2
4
7
  - Revert "Use HTTPS in all connections".
5
8
 
6
9
  ## 0.3.1
@@ -37,16 +37,12 @@ module DMMCrawler
37
37
  end
38
38
 
39
39
  def image_url
40
- if art_page?
41
- attrs = @page.search('.productPreview__item img').last.attributes
40
+ attrs = @page.search('.productPreview__item img').first.attributes
42
41
 
43
- if attrs['data-src']
44
- attrs['data-src'].value
45
- else
46
- attrs['src'].value
47
- end
42
+ if attrs['data-src']
43
+ attrs['data-src'].value
48
44
  else
49
- @page.search('img').last.attributes['src'].value
45
+ attrs['src'].value
50
46
  end
51
47
  end
52
48
 
@@ -1,3 +1,3 @@
1
1
  module DMMCrawler
2
- VERSION = '0.3.2'.freeze
2
+ VERSION = '0.3.3'.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.3.2
4
+ version: 0.3.3
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-21 00:00:00.000000000 Z
11
+ date: 2018-04-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mechanize