Skip to content

Instantly share code, notes, and snippets.

@lwu
Created April 24, 2009 21:08
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 lwu/101345 to your computer and use it in GitHub Desktop.
Save lwu/101345 to your computer and use it in GitHub Desktop.
#!/usr/bin/env ruby
require 'open-uri'
days = []
(1..15).each do |pg|
query = 'days+ago+whendidyoujointwitter'
s = open("http://search.twitter.com/search.json?q=#{query}&rpp=100&page=#{pg}")
days << s.read.scan(/(\d+) days ago/).flatten.map { |st| st.to_i }
end
puts days.flatten.sort
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment