Store other mentioned accounts so as to mention them in the reply as well...
This commit is contained in:
parent
4baabc3017
commit
fec551476d
1 changed files with 6 additions and 1 deletions
|
@ -34,6 +34,7 @@ while True:
|
|||
text = status.text.decode("UTF-8")
|
||||
sender = status.user.screen_name.encode("UTF-8")
|
||||
twid = int(status.id)
|
||||
comment = ""
|
||||
if "storn" in text.lower():
|
||||
try:
|
||||
api.update_status("@%s Okay, dein Wecktweet wurde storniert." % sender, twid)
|
||||
|
@ -69,8 +70,12 @@ while True:
|
|||
print e
|
||||
continue
|
||||
|
||||
words = text.split(" ")
|
||||
for word in words:
|
||||
if word[0] == "@":
|
||||
comment += word + " "
|
||||
|
||||
cur.execute("INSERT INTO tweets VALUES(%i,'%s','%s','',0)" % (twid,date.strftime("%Y-%m-%dT%H:%M:%S"),sender))
|
||||
cur.execute("INSERT INTO tweets VALUES(%i,'%s','%s','%s',0)" % (twid,date.strftime("%Y-%m-%dT%H:%M:%S"),sender,comment.strip()))
|
||||
sql_conn.commit()
|
||||
|
||||
savepoint = twid
|
||||
|
|
Loading…
Reference in a new issue