lib/imasquerade/extractor.rb in imasquerade-0.1.3 vs lib/imasquerade/extractor.rb in imasquerade-0.1.4
- old
+ new
@@ -24,12 +24,16 @@
reader = Nokogiri::XML(response.body_str)
array_of_feeds = reader.xpath('//xmlns:key[text()="feedURL"]/following-sibling::xmlns:string[1]/text()')
return array_of_feeds[0].to_s
rescue Nokogiri::XML::SyntaxError => e
puts "Caught exception: #{e}"
- return ""
+ return nil
rescue Curl::Err::HostResolutionError => e
puts "Caught exception: #{e}"
+ return nil
+ rescue Curl::Err::Curl::Err::RecvError => e
+ puts "Caught exception: #{e}"
+ return nil
end
end
end
end
\ No newline at end of file