Browse Source

Move to data/ directory

master
Nemo 2 years ago
parent
commit
a91c242951
2 changed files with 3 additions and 2 deletions
  1. +2
    -1
      .gitignore
  2. +1
    -1
      parse_listing.rb

+ 2
- 1
.gitignore View File

@ -1,3 +1,4 @@
vendor/
html/
*.csv
*.csv
data/

+ 1
- 1
parse_listing.rb View File

@ -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))


Loading…
Cancel
Save