Update retweeter for new API
This commit is contained in:
parent
520fff4402
commit
34e0214e81
1 changed files with 2 additions and 2 deletions
|
@ -21,9 +21,9 @@ def retweet(user, two=twitools.twObject(), db=dbtools.dbHelper()):
|
||||||
tw_counter = 0
|
tw_counter = 0
|
||||||
|
|
||||||
for status in timeline:
|
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"
|
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.executeQuery("INSERT INTO retweets('id','author','created_at','text') VALUES(" + str(status.id) + ",'" + user.lower() + "','" + timestamp + "','" + text + "')")
|
||||||
db.commit()
|
db.commit()
|
||||||
|
|
Loading…
Reference in a new issue