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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3a11adfbfd5cb39c56b7e43fba00a5fd90d6cd1c
4
- data.tar.gz: 5b6031b5927cf1a023845f93384f208a7a866d21
3
+ metadata.gz: 0a2b8b3eca3578785e60c19e4ebc651635c337fd
4
+ data.tar.gz: 13930b164ccde7b6bcb413a517bd96a4dd34ec3e
5
5
  SHA512:
6
- metadata.gz: 23433f26280420dcabaa062fb515e0c0c8fc88500c9cc784a26e94821cac49c0a06e0343170e18dd4a2cdfa7a8f094c0781c990064cbf872ab4b02937dbacd1b
7
- data.tar.gz: e559b04403a7c0e0ad18f7eeb1a1155eb777943bbe243936319a760c4cba306b916b5659e2971e77bb591e7f12bf59fa4ca9fa7de2f22656ba127ad92df24c42
6
+ metadata.gz: 7acc863e4e50e4e0c8bff4e0abda6fd226a898f8e0cdf3ddfa90bc274fc21c0d941fce57945931859bbcd8353183ed87d9d8b047b81046d3c23086fa624ae2bf
7
+ data.tar.gz: ae319b37d5759f88238586ce2d4c4f5e4f54fe10ea9d66f1a686140da666df504ac31b72723e1ed75b71123c721e09a789a107f2d49d0b87f35c002eeee6f4ed
@@ -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
@@ -1,3 +1,3 @@
1
1
  module Sfacg
2
- VERSION = '1.0.5'
2
+ VERSION = '1.0.6'
3
3
  end
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.5
4
+ version: 1.0.6
5
5
  platform: ruby
6
6
  authors:
7
- - Tony Jian
7
+ - Jian Weihang
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-02-02 00:00:00.000000000 Z
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.5
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: