parent
3a0545d053
commit
272053df38
|
@ -1,9 +1,10 @@
|
|||
require 'nokogiri'
|
||||
require 'csv'
|
||||
require 'date'
|
||||
|
||||
restaurants = []
|
||||
|
||||
CSV.open('database.csv', 'wb') do |csv|
|
||||
CSV.open("#{Date.today.to_s}.csv", 'wb') do |csv|
|
||||
csv << ['url', 'title', 'location', 'address', 'cuisine']
|
||||
Dir.glob('html/restaurants-*.html') do |file|
|
||||
page = Nokogiri::HTML(open(file))
|
||||
|
|
Loading…
Reference in New Issue