lib/onebox/engine/pubmed_onebox.rb in onebox-2.2.2 vs lib/onebox/engine/pubmed_onebox.rb in onebox-2.2.4

- old
+ new

@@ -9,10 +9,10 @@ matches_regexp Regexp.new("^https?://(?:(?:\\w)+\\.)?(www.ncbi.nlm.nih)\\.gov(?:/)?/pubmed/\\d+") private def get_xml - doc = Nokogiri::XML(open(URI.join(@url, "?report=xml&format=text"))) + doc = Nokogiri::XML(URI.open(URI.join(@url, "?report=xml&format=text"))) pre = doc.xpath("//pre") Nokogiri::XML("<root>" + pre.text + "</root>") end def authors_of_xml(xml)