Update retweeter for new API

This commit is contained in:
Klaus-Uwe Mitterer 2017-09-08 22:06:18 +02:00
parent 520fff4402
commit 34e0214e81

View file

@ -21,9 +21,9 @@ def retweet(user, two=twitools.twObject(), db=dbtools.dbHelper()):
tw_counter = 0
for status in timeline:
if (status.text[0] != "@" or two.whoami() in status.text) and status.text[0:2] != "RT":
if (status.full_text[0] != "@" or two.whoami() in status.full_text) and status.full_text[0:2] != "RT":
timestamp = status.created_at.strftime('%Y-%m-%d %H:%M:%S') + " +0000"
text = setuptools.unescapeText(status.text)
text = setuptools.unescapeText(status.full_text)
db.executeQuery("INSERT INTO retweets('id','author','created_at','text') VALUES(" + str(status.id) + ",'" + user.lower() + "','" + timestamp + "','" + text + "')")
db.commit()