Skip to content

Instantly share code, notes, and snippets.

@chatgris
Created March 24, 2014 10:59
Show Gist options
  • Save chatgris/9738215 to your computer and use it in GitHub Desktop.
Save chatgris/9738215 to your computer and use it in GitHub Desktop.
Earthquake.init do
output do |item|
if item["text"] || item["retweeted_status"]
matches = item['retweeted_status'].nil? ?
URI.extract(item["text"],["http", "https"]) :
URI.extract(item['retweeted_status']["text"],["http", "https"])
matches.each do |match_url|
browse match_url
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment