Created
November 5, 2015 14:36
-
-
Save dabonka/70cdf93aa0ca43469a62 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 "nokogiri" | |
require "open-uri" | |
page = Nokogiri::HTML(open("http://www.lesson1.ru/vocabulary/lexicographer/weather.html")) | |
page.search("tr")[2].each do |row| | |
original = row.css("td")[1].text | |
translated = row.css("td")[0].text | |
Card.create( original_text: original, translated_text: translated ) | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment