image-dumper 0.5 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/dumper.rb +1 -0
- data/lib/dumper/profiles/mangahere.rb +48 -0
- data/lib/dumper/version.rb +1 -1
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbcea2f504358565d2c1e8fdd8e5276fc3338261
|
4
|
+
data.tar.gz: 557c6ebfa821eba8ad59a063d72330c2d34fafe8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 62e403f34b233ec3063d6efea95d590fa75011a9e77c7bb0d9bf35c6034da8e02b6921ba38ffaa8cabb8e0ecf8307f7f09fbae3b744496367a5ef67350761247
|
7
|
+
data.tar.gz: b8692485b5ebaf75df3a98cfb564dbaf789e9888061c3b1124e1d1fca05a1f89a94c883f7757ff8118683a2e7af82eb07e24a158fe25a03f62366f3322abb7d2
|
data/lib/dumper.rb
CHANGED
@@ -0,0 +1,48 @@
|
|
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_mangahere(url, path, from = 1, to = 1)
|
24
|
+
Nokogiri::HTML(open(url)).xpath('//div[@class="detail_list"]/ul/li').each { |p|
|
25
|
+
chapter = p.children[1].children[1]['href'].to_s
|
26
|
+
|
27
|
+
dir = File.join path, p.children[1].text.sanitize_filename
|
28
|
+
Dir.mkdir(dir) unless File.directory? dir
|
29
|
+
|
30
|
+
option = Nokogiri::HTML(open(chapter)).xpath('//select[@class="wid60"]/option')
|
31
|
+
first = option.first.text.to_i
|
32
|
+
last = option.last.text.to_i
|
33
|
+
|
34
|
+
first.upto(last) { |i|
|
35
|
+
url = chapter.gsub(/\/[0-9]+\.html/, '') + i.to_s + '.html'
|
36
|
+
|
37
|
+
scan = Nokogiri::HTML(open(url)).xpath('//section[@id="viewer"]/a/img/@src')[0].to_s
|
38
|
+
self.get dir, scan, '', '', "#{i}.png"
|
39
|
+
}
|
40
|
+
}
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.info_mangahere
|
44
|
+
{ :from => false, :to => false }
|
45
|
+
end
|
46
|
+
|
47
|
+
end
|
48
|
+
end
|
data/lib/dumper/version.rb
CHANGED
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:
|
4
|
+
version: 0.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Giovanni Capuano
|
@@ -41,6 +41,7 @@ files:
|
|
41
41
|
- lib/dumper/profiles/gelbooru.rb
|
42
42
|
- lib/dumper/profiles/imagebam.rb
|
43
43
|
- lib/dumper/profiles/mangaeden.rb
|
44
|
+
- lib/dumper/profiles/mangahere.rb
|
44
45
|
- lib/dumper/profiles/mi9.rb
|
45
46
|
- lib/dumper/profiles/multiplayer.rb
|
46
47
|
- lib/dumper/profiles/redblow.rb
|