Create a gist now

Instantly share code, notes, and snippets.

@kkabetani /hanbey.rb
Last active Aug 29, 2015

What would you like to do?
scraping hanbey shop name
require 'nokogiri'
require 'open-uri'
connected_shop_name = ''
hanbey = Nokogiri::HTML(open('http://www.hanbey.com/info/'))
hanbey.css('.table_shopname strong').each do |all_shop_name|
all_shop_name.children.each do |divided_shop_name|
connected_shop_name += divided_shop_name.content.strip
end
puts connected_shop_name unless connected_shop_name.empty?
connected_shop_name = ''
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment