bengaluru-food-census/parse_dir.rb

11 lines
236 B
Ruby

require 'nokogiri'
page = Nokogiri::HTML(open("html/directory.html"))
page.css('a').each do |link|
if link['href'] and link['href'][0,55] === 'https://www.zomato.com/bangalore/directory/restaurants-'
puts link['href']
end
end