http_crawler 0.2.2.9 → 0.2.3.0

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: bfc90fb7db6f2f0f9b4c69a463b8d34238c726fd
4
- data.tar.gz: 616925cfae1d53f8f444857560e0b65bc71f73d6
3
+ metadata.gz: 52f21f9a41ac75989b37da494ca3cf4321c7cf5e
4
+ data.tar.gz: e9fe5e402ac1f6333471adafaf997f81af2459c5
5
5
  SHA512:
6
- metadata.gz: f967d82951667ef8559422eb575919755ef84d0b1792b8481b6e8b557566b132b289839eb9ec1d8d7921bb2e0dda1271b77c3af0c70b9d99d5c4bc0248c116c8
7
- data.tar.gz: 8a92dac36b280267f0e22d3be8035972082bab9172971c441fdc1be3f45c7a77bacde6f42e64b2b0a5b33789466bb85e315bde6f9690a584ca85846fb69aacc3
6
+ metadata.gz: fa99a2f0bdcce2dab203238c0aa0fe20dc970d925d359e538f58027fe9b7670cfae48d70c8eb3154a9343d9aa75dbe6c7ada2a64f88e036be9393829cc3184e6
7
+ data.tar.gz: 1fc66e66594a5d9907170f4d71ce7e6b34e4c3691520ef33c4eb30bd778f744c1abf55fc249e0e125b0a1d7ca8f3dcacc159233da3e40f2653406c1ff786a90c
@@ -161,7 +161,7 @@ module HttpCrawler
161
161
  # 重新请求
162
162
  post_fetch(uri_or_path, initheader, dest, &block)
163
163
  when Net::HTTPProxyAuthenticationRequired then
164
- Rails.logger.warn "Net::HTTPProxyAuthenticationRequired 407 to proxy:[#{proxy_address}:#{proxy_port}] =>#{address}"
164
+ Rails.logger.warn "Net::HTTPProxyAuthenticationRequired 407 to proxy:[#{@proxy_address}:#{@proxy_port}] =>#{address}"
165
165
  if update_proxy?
166
166
  server_error_sleep
167
167
  # 重新请求
@@ -25,7 +25,7 @@ module Net
25
25
  # 判断解压后数据编码格式
26
26
 
27
27
  # 从header取编码格式
28
- encoding = header['Content-Type'][/charset=([^, ;"]*)/, 1]
28
+ encoding = header['Content-Type'][/charset=([^, ;"]*)/, 1] if header['Content-Type']
29
29
 
30
30
  # 从html中的 charset 取编码格式
31
31
  encoding = @decoding_body[/charset=([^, ;"]*)/, 1] unless encoding
@@ -1,3 +1,3 @@
1
1
  module HttpCrawler
2
- VERSION = "0.2.2.9"
2
+ VERSION = "0.2.3.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: http_crawler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2.9
4
+ version: 0.2.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - jagger
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-01-10 00:00:00.000000000 Z
11
+ date: 2019-01-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec