Commit 387245a6 authored by Cody Zacharias's avatar Cody Zacharias Committed by GitHub

Add mentions field

parent 1cb40f0c
......@@ -22,7 +22,8 @@ def init(db):
hashtags text,
link text
retweet bool,
user_rt text
user_rt text,
mentions text
);
"""
cursor.execute(table_tweets)
......@@ -111,8 +112,9 @@ def tweets(conn, Tweet):
",".join(Tweet.hashtags),
Tweet.link,
Tweet.is_retweet,
Tweet.user_rt)
cursor.execute('INSERT INTO tweets VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)', entry)
Tweet.user_rt,
",".join(Tweet.mentions))
cursor.execute('INSERT INTO tweets VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)', entry)
conn.commit()
except sqlite3.IntegrityError:
pass
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment