Skip to content

Instantly share code, notes, and snippets.

@kkabetani
Created December 29, 2014 15:07
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/4712a4e9b68dee8a33bf to your computer and use it in GitHub Desktop.
Save kkabetani/4712a4e9b68dee8a33bf to your computer and use it in GitHub Desktop.
kanazawa.rb 開催日
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