diff --git a/.gitignore b/.gitignore index 36943b4..4eee70e 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ vendor/ html/ -*.csv \ No newline at end of file +*.csv +data/ \ No newline at end of file diff --git a/parse_listing.rb b/parse_listing.rb index 2b76f64..a76553b 100644 --- a/parse_listing.rb +++ b/parse_listing.rb @@ -4,7 +4,7 @@ require 'date' restaurants = [] -CSV.open("#{Date.today.to_s}.csv", 'wb') do |csv| +CSV.open("data/#{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))