Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixed getting tweet ID

  • Loading branch information...
commit e0ccab514f0280a5667caeb5eeddf0d4a02fad0b 1 parent cb2b0ab
@saghul authored
Showing with 4 additions and 1 deletion.
  1. +4 −1 twitter-bot.py
View
5 twitter-bot.py
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.