image-dumper 0.5.2 → 0.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/dumper +2 -1
- data/lib/dumper.rb +3 -1
- data/lib/dumper/profiles/behoimi.rb +3 -3
- data/lib/dumper/profiles/gelbooru.rb +1 -1
- data/lib/dumper/profiles/yande.rb +42 -0
- data/lib/dumper/version.rb +1 -1
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3960f76c2a10bb6bbfd4da19ad0abed12724fc80
|
4
|
+
data.tar.gz: 2f07de5e5282f3f151220501b3a81d2f9360e387
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aed38b3cccbcf8a57aa3b73ea6fa6204310f44ffa0929013f30ea8e21deacd250ef0f071af7871daf0ab202fec7bd770c1dcbaa4dfce19e4a5b718068dba29d8
|
7
|
+
data.tar.gz: e536ed78f3b3abf25eba7506649945b5625d8642cba9d935b565064058248832e9a7d32e11f2b2316f659a7c714cb71681dc7c7637d2123a9f2c2bcfe4275180
|
data/bin/dumper
CHANGED
data/lib/dumper.rb
CHANGED
@@ -23,9 +23,9 @@ module Dumper
|
|
23
23
|
def self.get_behoimi(url, path, from = 1, to = 1)
|
24
24
|
ua = 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0'
|
25
25
|
ref = url
|
26
|
-
|
27
|
-
|
28
|
-
Nokogiri::HTML(open(
|
26
|
+
|
27
|
+
from.upto(to) { |i|
|
28
|
+
Nokogiri::HTML(open("#{url}&page=#{i}", 'User-Agent' => ua, 'Referer' => ref)).xpath('//img[@class="preview "]/@src').each { |p|
|
29
29
|
self.get path, p.to_s.gsub('preview/', ''), ua, ref
|
30
30
|
}
|
31
31
|
}
|
@@ -24,7 +24,7 @@ module Dumper
|
|
24
24
|
page = 0
|
25
25
|
from.upto(to) { |i|
|
26
26
|
Nokogiri::HTML(open("#{url}&pid=#{page}")).xpath('//span[@class="thumb"]').each { |u|
|
27
|
-
self.get path, u.child.child['src'].gsub(/
|
27
|
+
self.get path, u.child.child['src'].gsub(/thumbnails/, 'images').gsub(/thumbnail_/, '')
|
28
28
|
}
|
29
29
|
|
30
30
|
page += 63
|
@@ -0,0 +1,42 @@
|
|
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_yande(url, path, from = 1, to = 1)
|
24
|
+
ua = 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0'
|
25
|
+
ref = url
|
26
|
+
|
27
|
+
from.upto(to) { |i|
|
28
|
+
Nokogiri::HTML(open("#{url}&page=#{i}", 'User-Agent' => ua, 'Referer' => ref)).xpath('//a[@class="directlink largeimg"]/@href').each { |u|
|
29
|
+
self.get path, u.to_s, ua, ref
|
30
|
+
}
|
31
|
+
|
32
|
+
puts "--- Page #{page} now... ---" # there are so much pages sometimes...
|
33
|
+
puts
|
34
|
+
}
|
35
|
+
end
|
36
|
+
|
37
|
+
def self.info_yande
|
38
|
+
{ :from => true, :to => true }
|
39
|
+
end
|
40
|
+
|
41
|
+
end
|
42
|
+
end
|
data/lib/dumper/version.rb
CHANGED
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.
|
4
|
+
version: 0.5.3
|
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-
|
11
|
+
date: 2013-10-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -24,6 +24,20 @@ dependencies:
|
|
24
24
|
- - ">="
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: certified
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
27
41
|
description: A dumper to download whole galleries from board like 4chan, imagebam,
|
28
42
|
mangaeden, deviantart, etc.
|
29
43
|
email: webmaster@giovannicapuano.net
|
@@ -47,6 +61,7 @@ files:
|
|
47
61
|
- lib/dumper/profiles/redblow.rb
|
48
62
|
- lib/dumper/profiles/sankakucomplex.rb
|
49
63
|
- lib/dumper/profiles/wallpaperhere.rb
|
64
|
+
- lib/dumper/profiles/yande.rb
|
50
65
|
- lib/dumper/utils.rb
|
51
66
|
- lib/dumper/version.rb
|
52
67
|
- lib/dumper.rb
|