-
-
Save anonymous/c86bb5ff9d460de0b529a25592759dad 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 'csv' | |
doc = Nokogiri::HTML(open('p100')) | |
csv = CSV.open("output.csv", 'w',{:col_sep => ";", :quote_char => "\"", :force_quotes => true}) | |
doc.css('#myForm table tr').each do |row| | |
tarray = [] | |
row.css('td').each do |row| | |
tarray << row | |
end | |
csv << tarray | |
end | |
csv.close | |
csvread = CSV.read('output.csv',{:col_sep => ";", :quote_char => "\"", :force_quotes => true}) | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment