Fixed some serious mistakes I made in the tweeter...

This commit is contained in:
Klaus-Uwe Mitterer 2015-03-18 21:48:26 +01:00
parent 8f9c64b6ad
commit 400995fc03

View file

@ -25,9 +25,13 @@ cur = sql_conn.cursor()
while True:
values = cur.execute("SELECT * FROM tweets WHERE timestamp < datetime('now')")
for status in values:
original = status[0]
original = int(status[0])
recipient = status[2]
comment = status[3]
api.update_status("@%s Es wär soweit... :)" % sender, twid)
try:
api.update_status("@%s Es wär soweit... :)" % recipient, original)
cur.execute("DELETE FROM tweets WHERE tweet_id = %i" % original)
except:
pass
time.sleep(10)