-
-
Save eric-wood/ce1830a4ea291075e5e2 to your computer and use it in GitHub Desktop.
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 'open-uri' | |
url = "http://google.com" # replace this with your stuff | |
open(url) do |f| | |
doc = Nokogiri::HTML(f.read) | |
# replace "n" with the element number you want | |
doc.css('b')[n].content | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment