lib/onebox/engine/imgur_onebox.rb in onebox-1.7.5 vs lib/onebox/engine/imgur_onebox.rb in onebox-1.7.6

- old
+ new

@@ -45,10 +45,11 @@ </div> HTML end def is_album? - oembed_data = Onebox::Helpers.symbolize_keys(::MultiJson.load(Onebox::Helpers.fetch_response("http://api.imgur.com/oembed.json?url=#{url}").body)) + response = Onebox::Helpers.fetch_response("http://api.imgur.com/oembed.json?url=#{url}") rescue "{}" + oembed_data = Onebox::Helpers.symbolize_keys(::MultiJson.load(response)) imgur_data_id = Nokogiri::HTML(oembed_data[:html]).xpath("//blockquote").attr("data-id") imgur_data_id.to_s[/a\//] end def image_html(og)