Created
March 24, 2014 10:59
-
-
Save chatgris/9738215 to your computer and use it in GitHub Desktop.
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
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