Created
January 25, 2012 00:12
-
-
Save clemens/1673703 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
require 'open-uri' | |
twitter_url = "https://api.twitter.com/1/followers/ids.json?screen_name=%s" | |
follower_ids = %w(travisci joshkalderimis konstantinhaase svenfuchs).map do |screen_name| | |
Array(eval(open(twitter_url % screen_name).read.match(/"ids":(\[[0-9,]+\])/)[1])) rescue [] | |
end.flatten.uniq | |
puts follower_ids.length |
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 'json' | |
require 'open-uri' | |
twitter_url = "https://api.twitter.com/1/followers/ids.json?screen_name=%s" | |
follower_ids = %w(travisci joshkalderimis konstantinhaase svenfuchs).map do |screen_name| | |
Array(JSON.parse(open(twitter_url % screen_name).read)['ids']) rescue [] | |
end.flatten.uniq | |
puts follower_ids.length |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment