image-dumper 0.5.3.10 → 0.5.4

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: 898385b3aeea05b0cef92d467635fd2d5b202442
4
- data.tar.gz: 8e1daf0d60e980e7fe3593fdce07d241fa1d20e0
3
+ metadata.gz: 38887f5f4d981fe5061e83ba0831c75306c7fa9c
4
+ data.tar.gz: a66cb6f8dc55fdc1c9fc07e5d72de6be9ef49c31
5
5
  SHA512:
6
- metadata.gz: 523638cabc83e9aca58325a585b8f55d21dc6b9846d42a068ab684a72d2c91958b4914f746daa3568b4b736a0ad940f2c071369570519c4382bedf436579c080
7
- data.tar.gz: 663a9d4e12ae0c89c82f6070e353c3a3aff1455b9eb8586e52a6bd3a2ec54ff027a890bba901dfb72fa906676d229ea23eaeba791ff515deff2a79bb4ee487da
6
+ metadata.gz: dc4ff1fc2d8e4fe4fca34bf3df86d4db48871c72d8686f538d8fff6ed9418b825493a1f741593f4c8dcdbb358042ce1af350a99f195cd34656a9427870c50462
7
+ data.tar.gz: c4ac82a112eb13d028f5614baef03c84beb87af9127483085fbe7ae5e8cea517e6d7b19078f3e1d2e151919e3dc80471e615bf1c9e7d6fe901b87d4fbddad6ae
data/bin/dumper CHANGED
@@ -25,8 +25,8 @@ options = {}
25
25
  OptionParser.new do |o|
26
26
  options[:url] = []
27
27
  options[:path] = []
28
- options[:from] = 1
29
- options[:to] = 1
28
+ options[:from] = nil
29
+ options[:to] = nil
30
30
 
31
31
  o.on '-l', '--list', 'Show available profiles' do
32
32
  abort 'Profiles available:'.tap { |s|
@@ -21,24 +21,30 @@ module Dumper
21
21
  module Profiles
22
22
 
23
23
  def self.get_fakku(url, path, from = 1, to = 999)
24
+ puts from
25
+ puts to
26
+ abort
24
27
  url += '/read' unless url.end_with? '/read'
25
28
  errors = 0
26
29
 
27
30
  cdn = open(url).read.split('window.params.thumbs')[1].split('\/thumbs\/')[0].gsub(/\\\//m, ?/)[5..-1] + '/images/'
28
31
 
32
+ ua = 'Mozilla/5.0 (Windows NT 6.2; WOW64; rv:16.0) Gecko/20100101 Firefox/16.0'
33
+ ref = url
34
+
29
35
  from.upto(to) { |i|
30
36
  return if errors == 10
31
37
 
32
38
  file = "%03d.jpg" % i
33
39
  filename = "#{cdn}#{file}"
34
-
35
- unless self.get path, URI.parse(URI.encode(filename, "[]"))
40
+
41
+ unless self.get path, URI.parse(URI.encode(filename, '[]')), ua, ref
36
42
  errors += 1
37
43
 
38
44
  file = File.join(path, file).gsub(File::SEPARATOR, File::ALT_SEPARATOR || File::SEPARATOR)
39
45
  File.delete(file) if File.exists? file
40
46
  end
41
- }
47
+ }
42
48
  end
43
49
 
44
50
  def self.info_fakku
@@ -19,6 +19,6 @@
19
19
 
20
20
  module Dumper
21
21
  def self.version
22
- '0.5.3.10'
22
+ '0.5.4'
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.10
4
+ version: 0.5.4
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-12-03 00:00:00.000000000 Z
11
+ date: 2013-12-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nokogiri