Created
December 29, 2014 15:07
-
-
Save kkabetani/4712a4e9b68dee8a33bf to your computer and use it in GitHub Desktop.
kanazawa.rb 開催日
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' | |
page = Nokogiri::HTML(open('http://kzrb.org/meetup/')) | |
dates = page.css('header ul li').map(&:text).reverse | |
YEAR = 2014 | |
dates = dates.map do |date| | |
date =~ /(#{YEAR}-\d\d-\d\d)/ | |
Regexp.last_match(1) | |
end.compact | |
p dates |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment