Permalink
Browse files

make it even more terse :-)

  • Loading branch information...
1 parent a070a5b commit 3cba50e9a33f12b92848872155f7b13f0fd16c55 @rtanglao committed Jul 1, 2012
Showing with 1 addition and 3 deletions.
  1. +1 −3 findSpammers.rb
View
@@ -21,12 +21,10 @@
raise(StandardError, "Couldn't authenticate, exiting")
exit
end
-print "connected\n"
topicsColl = db.collection("topics")
authors = []
topics = topicsColl.find({"subject" => /[êửáạướáĐôảôệ]/u},
:fields => ["author", "subject"])
-topics.each {|t| authors.push(t["author"]["at_sfn"])}
-authors.uniq!
+topics.each {|t| authors = authors | t["author"]["at_sfn"].split}
pp authors

0 comments on commit 3cba50e

Please sign in to comment.