From 34e0214e81cec41f808e4e9cf797095bcb4a3c3c Mon Sep 17 00:00:00 2001 From: Klaus-Uwe Mitterer Date: Fri, 8 Sep 2017 22:06:18 +0200 Subject: [PATCH] Update retweeter for new API --- retweeter.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/retweeter.py b/retweeter.py index e5d5801..663290d 100755 --- a/retweeter.py +++ b/retweeter.py @@ -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()