Created
December 17, 2016 20:40
-
-
Save drymar/f69b593e65cbdf488acdfd06ed944e42 to your computer and use it in GitHub Desktop.
This file contains hidden or 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' | |
require 'nokogiri' | |
def words | |
uri = 'http://www.languagedaily.com/learn-german/vocabulary/common-german-words' | |
html = open(uri) | |
doc = Nokogiri::HTML(html) | |
germans = doc.css('td.bigLetter') | |
germans.each do |german| | |
puts "German is: #{german.text}" | |
puts "English is: #{german.next_element.text}" | |
end | |
end | |
words |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment