Created
June 16, 2015 15:11
-
-
Save pdfrod/f8c32031536fd4b355bd to your computer and use it in GitHub Desktop.
Scrap emails from attending.io
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' | |
page = Nokogiri::HTML(open('attendees.html')) | |
page.css('li.attendee').each do |attendee| | |
name = attendee.css('.attendee__name > a:first-child').text.strip | |
email = attendee.to_s.scan(/mailto:([^"]+)/)[0][0] | |
puts "\"#{name}\",#{email}" | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment