Skip to content

Instantly share code, notes, and snippets.

@iain
Created June 26, 2012 20:28
Show Gist options
  • Save iain/2998714 to your computer and use it in GitHub Desktop.
Save iain/2998714 to your computer and use it in GitHub Desktop.
require 'mechanize'
require 'yaml'
$results = []
def find(a, link)
a.get link do |page|
page.search(:css, ".post").each do |post|
h2 = post.search(:css, "h2").first
if h2.text =~ /githubber/i
published = Time.parse(post.search(:css, ".published").first[:title])
name = $1.strip if h2.text =~ /(.*) is/
$results << [ published, name ]
end
end
next_link = page.links.find { |a| a.rel == ["next"] }
if next_link
find(a, next_link.href)
end
end
end
find(Mechanize.new, "http://github.com/blog")
File.open "output.csv", "w" do |f|
f.puts $results.map { |g| g.join(",") }.join("\n")
end
We can make this file beautiful and searchable if this error is corrected: Illegal quoting in line 78.
2012-06-26 02:39:59 +0200,Yossef Mendelssohn
2012-06-26 00:53:10 +0200,Kevin Barnes
2012-06-26 00:52:29 +0200,Rick Bradley
2012-06-26 00:05:25 +0200,Jared Koumentis
2012-06-20 00:20:08 +0200,Emma Bryant
2012-06-19 21:18:42 +0200,Julia West
2012-06-18 20:55:12 +0200,Scott Goldman
2012-06-18 20:40:56 +0200,Ted Nyman
2012-06-18 20:20:34 +0200,Keavy McMinn
2012-06-12 20:44:40 +0200,Chad Humphries
2012-06-12 03:09:54 +0200,Slava Shirokov
2012-06-04 23:23:54 +0200,Paul Sadauskas
2012-06-04 22:58:46 +0200,Coby Chapple
2012-06-04 20:25:21 +0200,Mike Skalnik
2012-06-04 19:48:17 +0200,Drew Woods
2012-05-29 19:20:02 +0200,Will Farrington
2012-05-21 20:56:42 +0200,David Graham
2012-05-21 20:26:52 +0200,Wynn Netherland
2012-05-16 00:32:52 +0200,Billy Roh
2012-05-08 01:51:54 +0200,Ryan Waldron
2012-05-08 01:42:52 +0200,Tony Jaramillo
2012-05-07 23:25:08 +0200,Jeremy Mcanally
2012-05-01 00:11:34 +0200,Shawn Davenport
2012-04-30 23:05:14 +0200,Tim Pease
2012-04-24 02:10:15 +0200,Rob Sanheim
2012-04-24 00:35:57 +0200,Ben Straub
2012-04-24 00:24:28 +0200,David Calavera
2012-04-10 00:04:47 +0200,Jason Salaz
2012-04-09 23:46:33 +0200,Sean Bryant
2012-04-09 23:34:24 +0200,Danish Khan
2012-04-03 00:49:26 +0200,Kyros Starr
2012-03-26 20:25:26 +0200,Jason Long
2012-03-26 20:21:02 +0200,John Barnette
2012-03-20 01:46:11 +0100,Lee Huffman
2012-03-19 19:16:37 +0100,Julie Ann Horvath
2012-03-13 05:19:11 +0100,David Newman
2012-03-05 19:54:19 +0100,Adam Roben
2012-03-05 18:25:28 +0100,Matthew McCullough
2012-02-20 20:06:44 +0100,Garrett Bjerkhoel
2012-02-20 19:43:12 +0100,Brian Doll
2012-02-13 23:17:31 +0100,Jake Douglas
2012-01-17 20:13:08 +0100,Russell Belfer
2012-01-16 22:34:52 +0100,Danny Greg
2011-12-09 23:17:37 +0100,Eric Gerhardt
2011-12-08 23:27:03 +0100,Nathan Sobo
2011-12-07 18:25:44 +0100,Phil Haack
2011-12-06 19:11:04 +0100,Jon Rohan
2011-12-05 19:02:26 +0100,Matt Graham
2011-12-05 19:02:23 +0100,Brandon Keepers
2011-12-05 19:02:21 +0100,Jonathan Hoyt
2011-12-05 19:02:18 +0100,John Nunemaker
2011-12-05 19:02:16 +0100,Steve Smith
2011-12-05 19:01:49 +0100,Ordered List
2011-12-01 22:09:49 +0100,Sonya Green
2011-11-07 22:53:36 +0100,Joel Watson
2011-10-26 18:49:02 +0200,Jake Boxer
2011-10-25 00:32:10 +0200,Lee Reilly
2011-10-19 01:42:21 +0200,Nick Hengeveld
2011-10-11 01:09:54 +0200,Roberto Tyley
2011-09-26 20:48:01 +0200,Justin Palmer
2011-09-08 20:27:20 +0200,Jina Bolton
2011-08-25 23:03:05 +0200,Jesse Newland
2011-08-23 00:34:40 +0200,Alex Williams
2011-08-01 21:00:00 +0200,Paul Betts
2011-07-18 21:02:42 +0200,Jon Maddox
2011-06-07 23:44:44 +0200,Matt Todd
2011-06-02 23:15:43 +0200,Kami Lott
2011-05-02 20:41:56 +0200,Ben Burkert
2011-04-19 19:43:46 +0200,Jason Costello
2011-04-04 18:20:36 +0200,Ben Bleikamp
2011-04-01 10:05:49 +0200,Josh Peek
2011-03-29 20:55:00 +0200,Vicent Marti
2011-03-28 23:28:19 +0200,Alex Malinovich
2011-03-15 19:45:18 +0100,Kevin Sawicki
2011-02-28 20:31:06 +0100,Josh Abernathy
2011-02-11 18:24:24 +0100,Tater
2011-02-10 19:39:15 +0100,Aman Gupta (tmm1)
2011-02-10 01:21:37 +0100,Simon "sr" Rozet
2011-02-08 20:09:29 +0100,Mislav Marohnić
2011-02-08 00:06:04 +0100,Tim Clem
2011-02-01 10:05:57 +0100,Corey Johnson
2011-01-17 20:08:07 +0100,Cameron McEfee
2011-01-03 22:32:28 +0100,Jeff King (Peff)
2011-01-03 18:50:49 +0100,Bryan Veloso
2010-11-01 19:13:38 +0100,Brian Lopez
2010-09-24 19:15:19 +0200,Tim Sharpe
2010-09-15 21:22:24 +0200,Eston Bond
2010-08-31 02:25:22 +0200,Corey Donohoe
2010-04-05 19:47:44 +0200,Rick Olson
2010-03-16 21:48:50 +0100,Zach Holman
2009-10-19 18:37:58 +0200,Ryan Tomayko
2009-10-05 20:20:11 +0200,Kyle Neath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment