Skip to content

Instantly share code, notes, and snippets.

@kkabetani
Last active August 29, 2015 14:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kkabetani/10f708fe9f31a585ca56 to your computer and use it in GitHub Desktop.
Save kkabetani/10f708fe9f31a585ca56 to your computer and use it in GitHub Desktop.
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