bengaluru-food-census/parse_dir.rb

11 lines
236 B
Ruby
Raw Normal View History

2018-01-01 18:49:07 +00:00
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