#Beercamp Twitter Bot in Python
Just started reading Python book for beginner, and wrote very simple code the day before yesterday.Yesterday and today, I spent few hours to read the book and try to code. I made a rule not to open the books during the daytime…. gotta work!
Today I made TwitterBot which tell you when is the next #Beercamp.
At the last #Beercamp, people said that it took 10 min to convince @KayEss that the day was Thursday and the day for #Beercamp, it gave me idea.
For now this is very simple, bot tells you, it’s one way. I want to add a feature to get @reply and retweet. so that the organizer can spread the information via the bot.
It works fine on my computer, installed Python 2.6. However the version on the hosting server is 2.4, get error back…. orz
Traceback (most recent call last):
File “/var/www/vhosts/***/beercampbot.py”, line 62, in ?
post = twitt.update_status(status) #update status
File “/var/www/vhosts/***/beercampbot.py”, line 28, in update_statusresponse = self.connection.getresponse()
File “/usr/lib/python2.4/httplib.
py”, line 872, in getresponse
response.begin()
File “/usr/lib/python2.4/httplib.py”, line 336, in begin
version, status, reason = self._read_status()
File “/usr/lib/python2.4/httplib.py”, line 300, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine
When It’s done, I’d like to ask @beercamp to use the account for this.

This work, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Share Alike 3.0 Thailand License.
About this entry
You’re currently reading “ #Beercamp Twitter Bot in Python ,” an entry on 31o5.com
- Published:
- 2.18.09 / 10pm
- Category:
- Life with technology
2 Comments
Jump to comment form | comments rss [?] | trackback uri [?]