Ok, I REALLY have to stop coming up with hare-brained ideas, and then listening to others when they convince me to implement them.
So after a couple of hours of ruby hacking, I came up with: You can’t do that on twitter. Eveytime someone says the magic words, you should see their avatar get slimed! You can even try the public timeline or your own timeline (Click here and and change madpilot in the url to your username). Note though, that because this isn’t authenticated, your timeline will need to be public for it to work.
How it works
- Work out what page is requested (uses apache mod_rewrite for this)
- Build the twitter URL, and request it using Mechanize
- Parse the HTML using Hpricot
- Iterate through the tweets, grepping for the term “I don’t know”. If it finds it, it inserts the “slime” class
I started off using Mechanize, then realised I didn’t really need it, but left it in there as it does do the HTTP request thing quite well. Download the source. Enjoy!
Update: Some good old You can’t do that on television sliming: