Commit be7e037f authored by Cody Zacharias's avatar Cody Zacharias Committed by GitHub

Add link

parent 14dbaffd
...@@ -19,7 +19,8 @@ def init(db): ...@@ -19,7 +19,8 @@ def init(db):
replies integer, replies integer,
likes integer, likes integer,
retweets integer, retweets integer,
hashtags text hashtags text,
link text
); );
""" """
cursor.execute(table_tweets) cursor.execute(table_tweets)
...@@ -102,8 +103,9 @@ def tweets(conn, Tweet): ...@@ -102,8 +103,9 @@ def tweets(conn, Tweet):
Tweet.replies, Tweet.replies,
Tweet.likes, Tweet.likes,
Tweet.retweets, Tweet.retweets,
",".join(Tweet.hashtags),) ",".join(Tweet.hashtags),
cursor.execute("INSERT INTO tweets VALUES(?,?,?,?,?,?,?,?,?,?)", entry) Tweet.link,)
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