Commit 25018903 authored by minamotorin's avatar minamotorin Committed by GitHub

Merge pull request #11 from Tortar/patch-1

Update db.py
parents 9bfe0d5f b5a04e5b
......@@ -252,7 +252,7 @@ def tweets(conn, Tweet, config):
Tweet.datestamp,
Tweet.timestamp,
Tweet.timezone,
Tweet.place,
str(Tweet.place),
Tweet.replies_count,
Tweet.likes_count,
Tweet.retweets_count,
......@@ -261,7 +261,7 @@ def tweets(conn, Tweet, config):
Tweet.username,
Tweet.name,
Tweet.link,
",".join(Tweet.mentions),
",".join(str(x) for x in Tweet.mentions),
",".join(Tweet.hashtags),
",".join(Tweet.cashtags),
",".join(Tweet.urls),
......@@ -290,7 +290,7 @@ def tweets(conn, Tweet, config):
if Tweet.reply_to:
for reply in Tweet.reply_to:
query = 'INSERT INTO replies VALUES(?,?,?)'
cursor.execute(query, (Tweet.id, int(reply['user_id']), reply['username']))
cursor.execute(query, (Tweet.id, int(reply['id']), reply['name']))
conn.commit()
except sqlite3.IntegrityError:
......
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