fix error
This commit is contained in:
parent
9b4eec8a71
commit
f78b05cad1
|
@ -11,7 +11,7 @@ namespace :feeds_module do
|
|||
req = Net::HTTP::Get.new(uri)
|
||||
http.request(req)
|
||||
end
|
||||
if (res_net.code == '301' return true)
|
||||
if (res_net.code == '301' rescue true)
|
||||
begin
|
||||
uri = URI(res_net['location'])
|
||||
res_net = Net::HTTP.start(uri.host, uri.port,:use_ssl => uri.scheme == 'https',open_timeout: 60,read_timeout: 60) do |http|
|
||||
|
|
Loading…
Reference in New Issue