image-dumper 0.5.3.8 → 0.5.3.9

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
  SHA1:
3
- metadata.gz: fc2baca433b2453ed56133333b7905130805806b
4
- data.tar.gz: e58bc8d7958aaefe58f13f6a209f121b8ab4f994
3
+ metadata.gz: 745e8b2282e42393774a9e7f5b0a95ab04a7552e
4
+ data.tar.gz: ab05bec926cb9fb5f50b6c655015d4a2bfe8efcc
5
5
  SHA512:
6
- metadata.gz: a63634fd080eacf34ee9aba8faff3ae8b4921f70a1d893ec4cb785e7b4f38cfd414e9b88f924fb20ee0f0b47ba9b45edb85e53179659c25c366aa96067520751
7
- data.tar.gz: 97e4bebe33c40877829fb753f1dbebea754c33b00fc8e3b75b527081ce69b016dcfba997b80e04327c283cf353a501a3c8d2478799d560fc897c258575b0ea0a
6
+ metadata.gz: 3b609fba18e5f81b711a277d77f5ea13d45908a7765ddbeb6f805621847d9fcc41e32df60ce6cf6c8a96d48a8e0dc14095f92b77533dfb243f5d7b0fa6d040ac
7
+ data.tar.gz: 04651a42c09883d2d02f7feb0599c4eba5c10e47e2337b5f23917956968682bf71c0c8e753c2a4869e4d482b50ae228481bd53569a03f595936372d777ae12a2
@@ -24,21 +24,15 @@ module Dumper
24
24
  ua = 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0'
25
25
  ref = url
26
26
 
27
- if url.include? '/pool/show/'
28
- Nokogiri::HTML(open(url, 'User-Agent' => ua, 'Referer' => ref)).xpath('//a[@class="thumb"]/@href').each { |p|
27
+ from.upto(to) { |i|
28
+ Nokogiri::HTML(open("#{url}&page=#{i}", 'User-Agent' => ua, 'Referer' => ref)).xpath('//a[@class="thumb"]/@href').each { |p|
29
29
  img = Nokogiri::HTML(open("https://yande.re#{p}", 'User-Agent' => ua, 'Referer' => ref)).at_xpath('//img[@id="image"]/@src').text
30
30
  self.get path, img, ua, ref
31
31
  }
32
- else
33
- from.upto(to) { |i|
34
- Nokogiri::HTML(open("#{url}&page=#{i}", 'User-Agent' => ua, 'Referer' => ref)).xpath('//a[@class="directlink largeimg"]/@href').each { |u|
35
- self.get path, u.to_s, ua, ref
36
- }
37
-
38
- puts "--- Page #{i} now... ---" # there are so much pages sometimes...
39
- puts
40
- }
41
- end
32
+
33
+ puts "--- Page #{i} now... ---" # there are so much pages sometimes...
34
+ puts
35
+ }
42
36
  end
43
37
 
44
38
  def self.info_yande
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Dumper
21
21
  def self.version
22
- '0.5.3.8'
22
+ '0.5.3.9'
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image-dumper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3.8
4
+ version: 0.5.3.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano