image-dumper 0.5.3.1 → 0.5.3.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 320a7eb762ae6117342b84f3c92992a7306d2632
4
- data.tar.gz: 88efe1c93d4b5ed6f34d674ba2112e275b6001b7
3
+ metadata.gz: 0286228c0f81afd4c8ce54693cf69bb0db44fb6c
4
+ data.tar.gz: 9cf628263007f55d819646018cc6e3998e95f9ad
5
5
  SHA512:
6
- metadata.gz: cea23bffccd4b600e44adc833e38cf50070fd432632407915beba49df8579c31e1e9e825c6b6bf97bb17929cf8008603146ab815cb12f1a970b2661088053082
7
- data.tar.gz: 21636e63a63e7632657006ad26cefeb173c1ee2e26048fc0babd91b9e166a3eb228537287e473d4f3a2d092d43d6b93173fce71f43a8bc9dc6759a2686214a4d
6
+ metadata.gz: e7316645d518950f3893d7a1a063d23b3a13339cf406c4c8181b519c358242bcf956fd2130b74e804be832b4c214e7585942d4f92ee9e15a6917142fc9c1b75c
7
+ data.tar.gz: 7b3f05a77c9a4241e4d1bdb9eccfbeaa6c651331d4200e4fc0e087f468370c7491f045e4f29f28a5a0b290d288e611bdffba0915050c531395bfe66690d0de14
data/bin/dumper CHANGED
@@ -89,7 +89,7 @@ options[:url].each_with_index { |url, i|
89
89
  host = URI.parse(url).host.split(?.)[-2]
90
90
  Dir.mkdir(options[:path][i]) unless File.directory? options[:path][i]
91
91
 
92
- if Dumper::Profiles::list.include? host
92
+ if Dumper::Profiles::list.include? host.gsub(?-, ?_)
93
93
  method = ('get_' + host.gsub(?-, ?_)).to_sym
94
94
  Dumper::Profiles::send method, url, options[:path][i], options[:from], options[:to]
95
95
  else
@@ -0,0 +1,34 @@
1
+ #--
2
+ # Copyright(C) 2013 Giovanni Capuano <webmaster@giovannicapuano.net>
3
+ #
4
+ # This file is part of Dumper.
5
+ #
6
+ # Dumper is free software: you can redistribute it and/or modify
7
+ # it under the terms of the GNU General Public License as published by
8
+ # the Free Software Foundation, either version 3 of the License, or
9
+ # (at your option) any later version.
10
+ #
11
+ # Dumper is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with Dumper. If not, see <http://www.gnu.org/licenses/>.
18
+ #++
19
+
20
+ module Dumper
21
+ module Profiles
22
+
23
+ def self.get_fc2(url, path, from = 1, to = 1)
24
+ Nokogiri::HTML(open(url)).xpath('//img[@class="thumbnail_image"]').each { |p|
25
+ self.get path, p['src']
26
+ }
27
+ end
28
+
29
+ def self.info_fc2
30
+ { :from => false, :to => false }
31
+ end
32
+
33
+ end
34
+ end
@@ -0,0 +1,38 @@
1
+ #--
2
+ # Copyright(C) 2013 Giovanni Capuano <webmaster@giovannicapuano.net>
3
+ #
4
+ # This file is part of Dumper.
5
+ #
6
+ # Dumper is free software: you can redistribute it and/or modify
7
+ # it under the terms of the GNU General Public License as published by
8
+ # the Free Software Foundation, either version 3 of the License, or
9
+ # (at your option) any later version.
10
+ #
11
+ # Dumper is distributed in the hope that it will be useful,
12
+ # but WITHOUT ANY WARRANTY; without even the implied warranty of
13
+ # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
+ # GNU General Public License for more details.
15
+ #
16
+ # You should have received a copy of the GNU General Public License
17
+ # along with Dumper. If not, see <http://www.gnu.org/licenses/>.
18
+ #++
19
+
20
+ module Dumper
21
+ module Profiles
22
+
23
+ def self.get_i_doujin(url, path, from = 1, to = 1)
24
+ url = url.scan(/(.*?)\/p\:/).first.first if url.include? '/p:'
25
+
26
+ pages = Nokogiri::HTML(open("#{url}/p:1")).xpath('//div[@class="pager-navigation"]').text.split(?/)[1].scan(/\d+/)[0].to_i
27
+
28
+ 1.upto(pages) { |i|
29
+ self.get path, Nokogiri::HTML(open("#{url}/p:#{i}")).xpath('//div[@class="doujin-img-view"]/img/@src')[0]
30
+ }
31
+ end
32
+
33
+ def self.info_i_doujin
34
+ { :from => false, :to => false }
35
+ end
36
+
37
+ end
38
+ end
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Dumper
21
21
  def self.version
22
- '0.5.3.1'
22
+ '0.5.3.2'
23
23
  end
24
24
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image-dumper
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.3.1
4
+ version: 0.5.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Giovanni Capuano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-08 00:00:00.000000000 Z
11
+ date: 2013-10-09 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri
@@ -52,8 +52,10 @@ files:
52
52
  - lib/dumper/profiles/booru.rb
53
53
  - lib/dumper/profiles/deviantart.rb
54
54
  - lib/dumper/profiles/fakku.rb
55
+ - lib/dumper/profiles/fc2.rb
55
56
  - lib/dumper/profiles/gelbooru.rb
56
57
  - lib/dumper/profiles/imagebam.rb
58
+ - lib/dumper/profiles/i_doujin.rb
57
59
  - lib/dumper/profiles/mangaeden.rb
58
60
  - lib/dumper/profiles/mangahere.rb
59
61
  - lib/dumper/profiles/mi9.rb