sfacg 1.0.5 → 1.0.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/sfacg/chapter.rb +3 -2
- data/lib/sfacg/version.rb +1 -1
- metadata +4 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0a2b8b3eca3578785e60c19e4ebc651635c337fd
|
4
|
+
data.tar.gz: 13930b164ccde7b6bcb413a517bd96a4dd34ec3e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7acc863e4e50e4e0c8bff4e0abda6fd226a898f8e0cdf3ddfa90bc274fc21c0d941fce57945931859bbcd8353183ed87d9d8b047b81046d3c23086fa624ae2bf
|
7
|
+
data.tar.gz: ae319b37d5759f88238586ce2d4c4f5e4f54fe10ea9d66f1a686140da666df504ac31b72723e1ed75b71123c721e09a789a107f2d49d0b87f35c002eeee6f4ed
|
data/lib/sfacg/chapter.rb
CHANGED
@@ -4,6 +4,7 @@ require 'fileutils'
|
|
4
4
|
|
5
5
|
module Sfacg
|
6
6
|
class Chapter
|
7
|
+
SF_HOST = 'http://hotpic.sfacg.com/'.freeze
|
7
8
|
def initialize url
|
8
9
|
@uri = URI(url)
|
9
10
|
@js_uri = @images = nil
|
@@ -33,7 +34,7 @@ module Sfacg
|
|
33
34
|
file_path = File.join(to, file_name)
|
34
35
|
begin
|
35
36
|
Net::HTTP.start(img_uri.host, img_uri.port, read_timeout: 5) do |http|
|
36
|
-
File.write file_path, open(img_uri).read, mode: 'wb'
|
37
|
+
File.write file_path, open(img_uri, 'Referer' => SF_HOST).read, mode: 'wb'
|
37
38
|
puts "#{img_uri} -> #{file_path}"
|
38
39
|
end
|
39
40
|
rescue
|
@@ -46,4 +47,4 @@ module Sfacg
|
|
46
47
|
$stderr.puts $!.inspect, $@
|
47
48
|
end
|
48
49
|
end
|
49
|
-
end
|
50
|
+
end
|
data/lib/sfacg/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sfacg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
|
-
-
|
7
|
+
- Jian Weihang
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-06-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -99,9 +99,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
99
99
|
version: '0'
|
100
100
|
requirements: []
|
101
101
|
rubyforge_project:
|
102
|
-
rubygems_version: 2.4
|
102
|
+
rubygems_version: 2.6.4
|
103
103
|
signing_key:
|
104
104
|
specification_version: 4
|
105
105
|
summary: sfacg comic downloader
|
106
106
|
test_files: []
|
107
|
-
has_rdoc:
|