fun with python-twitter

Submitted by rogueclown on Thu, 09/17/2009 - 21:09

Sometimes, coding is serious business.

And, sometimes, coding is not serious business at all.

I've done a little bit of playing around with Twitter in the past. Last year, I wrote a simple twitter client bash script, so I could update my status from the command line. I've gotten some work done on a twitter bot that actually tries to fool people into thinking it is human. I haven't put it online yet, since I need to finish writing the content that implies that this bot is up to interesting things during different parts of different days.

However, this morning, Rob T Firefly gave me the idea to take that silly Kanye West internet meme and turn it into a Twitter bot. Right now it polls the public timeline every thirty seconds, and searches for tweets that say "thanks" or "thank you." If it finds any such tweets, it responds to the writer of the tweet and tells them that it is happy for them and will let them finish, but that whoever tweeted just before them in the public timeline had one of the best tweets of all time. I am also adding functionality that spits back a random Kanye West quote from a list if anyone @ replies to the bot.

The code is still a work in progress, but the latest version of it is up on my projects page. I'm quite pleased that it has been running on Twitter for about ten hours so far, and the account has not yet been deleted for being a spam bot.

story tags 

social networking, python, code

Comments

Submitted by anonymous on Fri, 09/18/2009 - 11:04

There's nothing in the Terms of Service that prevents bots as a matter of course. The only applicable section i could find is a part that says:

You may not do any of the following while accessing or using the Services:...(v) interfere with, or disrupt, (or attempt to do so), the access of any user, host or network, including, without limitation, sending a virus, overloading, flooding, spamming, mail-bombing the Services, or by scripting the creation of Content in such a manner as to interfere with or create an undue burden on the Services.

Basically, as long as I don't spam, or send so many tweets that I slow down Twitter, I should be in the clear. I'm pretty sure that's not an issue with this bot, especially since I am still limited to the 150 API calls per hour. (I have a whitelisting request that is pending, but we'll see how that goes.)

Add new comment