Created
August 30, 2008 19:57
-
-
Save tommorris/8138 to your computer and use it in GitHub Desktop.
A script to check for spam on Gist
This file contains hidden or 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' | |
require 'hpricot' | |
def isAnonymousGist(url) | |
(Hpricot(open(url))/"div[@class = 'file']").each { |i| | |
if (i/"span[@class = 'date']/a[@href]").size == 0 | |
url = "http://gist.github.com" + (i/"div[@class = 'info']/span/a")[0]['href'] | |
system "open \"" + url + "\"" | |
puts url | |
end | |
} | |
end | |
(144..554).each do |i| | |
url = "http://gist.github.com/gists?page=" + i.to_s | |
isAnonymousGist (url) | |
sleep 5 | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment