Last active
December 19, 2016 15:32
-
-
Save fjustin/486ba1c36c13e97cb85f2f58cb7274ba 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 'open-uri' | |
require 'nokogiri' | |
url = 'http://www.tcu.ac.jp/topics/index.html' # 大学のURL | |
doc = Nokogiri::HTML(open(url)) # urlの読み込み | |
p doc.css('.topics-entrytitle').inner_text # お知らせの一覧 | |
p doc.css('.entrydate').inner_text # お知らせが投稿された日 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This is the new Gist.
I made wrong Gist three days ago, so I rewrite it.