Created
August 2, 2018 12:00
-
-
Save saboyutaka/cb63af83ef2b18272b16f11607b00b90 to your computer and use it in GitHub Desktop.
スクレイピングの実演
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'nokogiri' | |
require 'httparty' | |
url = 'https://www.ryukyu-frogs.com/information/' | |
res = HTTParty.get(url) | |
doc = Nokogiri::HTML.parse(res.body) | |
doc.css('.news-list li').each do |node| | |
puts node.css('.content .title').text | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment