Created
July 7, 2010 23:05
-
-
Save oc/467424 to your computer and use it in GitHub Desktop.
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
| tweets = [] | |
| Dir['search*'].each do |f| | |
| File.open(f).readlines.join.scan(/(<li class="hentry status .*?<\/li>)/m).each do |tweet| | |
| author = tweet[0].scan(/;">(.*?)<\/a>.*?<span id="msgtxt/m)[0].to_s | |
| text = tweet[0].scan(/<span id="msgtxt\d+" class="msgtxt \w+">(.*?)<\/span>/m)[0].to_s.gsub(/<.*?>/, '') | |
| tweets << [author, text] | |
| end | |
| end | |
| puts tweets.uniq.sort.size |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment