Permalink
Browse files

Fixed getting tweet ID

  • Loading branch information...
1 parent cb2b0ab commit e0ccab514f0280a5667caeb5eeddf0d4a02fad0b @saghul committed Sep 13, 2010
Showing with 4 additions and 1 deletion.
  1. +4 −1 twitter-bot.py
View
@@ -52,7 +52,10 @@ def start(self, searchtag):
con.isolation_level = None
twitts = self.search_tag(searchtag)
for twitt in reversed(twitts['entries']):
- twitt_id = twitt.id.split(':')[2]
+ try:
+ twitt_id = twitt.id.split(':')[2]
+ except IndexError:
+ twitt_id = twitt.id.split(':')
twitt_author = twitt.author.split(' ')[0]
twitt_content = twitt.title

0 comments on commit e0ccab5

Please sign in to comment.