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): ...@@ -22,7 +22,8 @@ def init(db):
hashtags text, hashtags text,
link text link text
retweet bool, retweet bool,
user_rt text user_rt text,
mentions text
); );
""" """
cursor.execute(table_tweets) cursor.execute(table_tweets)
...@@ -111,8 +112,9 @@ def tweets(conn, Tweet): ...@@ -111,8 +112,9 @@ def tweets(conn, Tweet):
",".join(Tweet.hashtags), ",".join(Tweet.hashtags),
Tweet.link, Tweet.link,
Tweet.is_retweet, Tweet.is_retweet,
Tweet.user_rt) Tweet.user_rt,
cursor.execute('INSERT INTO tweets VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)', entry) ",".join(Tweet.mentions))
cursor.execute('INSERT INTO tweets VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?)', entry)
conn.commit() conn.commit()
except sqlite3.IntegrityError: except sqlite3.IntegrityError:
pass 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