Skip to content

Instantly share code, notes, and snippets.

@fjustin
Last active December 19, 2016 15:32
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 fjustin/486ba1c36c13e97cb85f2f58cb7274ba to your computer and use it in GitHub Desktop.
Save fjustin/486ba1c36c13e97cb85f2f58cb7274ba to your computer and use it in GitHub Desktop.
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 # お知らせが投稿された日
@fjustin
Copy link
Author

fjustin commented Dec 19, 2016

This is the new Gist.
I made wrong Gist three days ago, so I rewrite it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment