lib/rfcbib/scrapper.rb in rfcbib-0.2.1 vs lib/rfcbib/scrapper.rb in rfcbib-0.2.2

- old
+ new

@@ -15,10 +15,10 @@ def scrape_page(text) ref = text.sub(' ', '.') + '.xml' if text =~ /^RFC/ uri = URI("https://www.rfc-editor.org/refs/bibxml/reference.#{ref}") elsif text =~ /^I-D/ - uri = URI "https://xml2rfc.tools.ietf.org/public/rfc/bibxml-ids/reference.#{ref}" + uri = URI("https://xml2rfc.tools.ietf.org/public/rfc/bibxml-ids/reference.#{ref}") end doc = Nokogiri::HTML Net::HTTP.get(uri) @reference = doc.at('//reference') return unless @reference bib_item