Skip to content

Instantly share code, notes, and snippets.

@danbri
Created January 11, 2011 20:48
Show Gist options
  • Save danbri/775106 to your computer and use it in GitHub Desktop.
Save danbri/775106 to your computer and use it in GitHub Desktop.
!/usr/bin/ruby
require 'open-uri'
f = File.read('celebrities_profiles.txt')
f.each do |c|
fields = c.split(/\t/)
screen_name = fields[16];
url = fields[20];
# puts "Got: #{fields[16]} url: #{fields[20]}"
if (url =~ /http:/)
puts "GETTING #{url}"
open(url) do |page|
doc = page.read
doc.scan(/twitter.com\/([A-Za-z0-9]+)/) do |x|
puts "MATCHED: #{x}"
end
end
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment