Last active
December 18, 2015 12:09
-
-
Save pezholio/5780309 to your computer and use it in GitHub Desktop.
I'm going slightly mad
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
require 'open-uri' | |
uri = "http://data.gov.uk/dataset/water-framework-directive-lake-waterbodies-wfs" | |
doc = Nokogiri::HTML(open(uri)) | |
doc.search('link[rel=alternate]').each do |e| | |
if e[:type] == "application/rdf+xml" | |
puts "rdf should be #{e[:href]}" | |
rdf = e[:href] | |
end | |
end | |
# rdf should be http://data.gov.uk/dataset/water-framework-directive-lake-waterbodies-wfs.rdf | |
# > rdf | |
# NameError: undefined local variable or method `rdf' for main:Object | |
rdf = "foo" | |
# > rdf | |
# => "foo" | |
# WAT |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment