image-dumper 0.5.2 → 0.5.3

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: 8d2c5f2fa5cf5ba74323b6938158e8cd94079f43
4
- data.tar.gz: e618afb881d35b18feb51a263c14ea3626d9938d
3
+ metadata.gz: 3960f76c2a10bb6bbfd4da19ad0abed12724fc80
4
+ data.tar.gz: 2f07de5e5282f3f151220501b3a81d2f9360e387
5
5
  SHA512:
6
- metadata.gz: cacd8f29e451aa7c6ba0b0a8e52d205c33f62168cbccdfa2485ec5b00202f5b890fcce8e78fd08aac4b49368da12cdb81535fa09045343c61589259cca0c5614
7
- data.tar.gz: 5e91734f70f8f3a8042070e0b555baadb5ee4ffc11a14bd308f61eaf633f0902e0c617a9613880bbd430d3be6d16e7a99af49a55e6403f68d284d756f1623a8f
6
+ metadata.gz: aed38b3cccbcf8a57aa3b73ea6fa6204310f44ffa0929013f30ea8e21deacd250ef0f071af7871daf0ab202fec7bd770c1dcbaa4dfce19e4a5b718068dba29d8
7
+ data.tar.gz: e536ed78f3b3abf25eba7506649945b5625d8642cba9d935b565064058248832e9a7d32e11f2b2316f659a7c714cb71681dc7c7637d2123a9f2c2bcfe4275180
data/bin/dumper CHANGED
@@ -25,7 +25,8 @@ options = {}
25
25
  OptionParser.new do |o|
26
26
  options[:url] = []
27
27
  options[:path] = []
28
- options[:pages] = 1
28
+ options[:from] = 1
29
+ options[:to] = 1
29
30
 
30
31
  o.on '-l', '--list', 'Show available profiles' do
31
32
  abort 'Profiles available:'.tap { |s|
data/lib/dumper.rb CHANGED
@@ -18,10 +18,12 @@
18
18
  #++
19
19
 
20
20
  require 'open-uri'
21
- require 'nokogiri'
22
21
  require 'uri'
23
22
  require 'optparse'
24
23
  require 'net/http'
24
+ require 'nokogiri'
25
+ require 'openssl'
26
+ require 'certified'
25
27
  require 'base64'
26
28
 
27
29
  require 'dumper/utils'
@@ -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
- from.upto(to) { |page|
27
- u = url + "&page=#{page}"
28
- Nokogiri::HTML(open(u, 'User-Agent' => ua, 'Referer' => ref)).xpath('//img[@class="preview "]/@src').each { |p|
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(/thumbs/, 'images').gsub(/thumbnail_/, '')
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
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Dumper
21
21
  def self.version
22
- '0.5.2'
22
+ '0.5.3'
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.2
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-09-30 00:00:00.000000000 Z
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