Commit 8b9a39e2 authored by Francesco Poldi's avatar Francesco Poldi

Fixed SQLite support

parent f11f3867
...@@ -60,7 +60,6 @@ def init(db): ...@@ -60,7 +60,6 @@ def init(db):
time text not null, time text not null,
timezone text not null, timezone text not null,
place text default '', place text default '',
location text not null,
replies_count integer, replies_count integer,
likes_count integer, likes_count integer,
retweets_count integer, retweets_count integer,
...@@ -68,7 +67,6 @@ def init(db): ...@@ -68,7 +67,6 @@ def init(db):
user_id_str text not null, user_id_str text not null,
screen_name text not null, screen_name text not null,
name text default '', name text default '',
profile_image_url text,
link text, link text,
mentions text, mentions text,
hashtags text, hashtags text,
...@@ -77,6 +75,8 @@ def init(db): ...@@ -77,6 +75,8 @@ def init(db):
photos text, photos text,
quote_url text, quote_url text,
video integer, video integer,
geo text,
near text,
time_update integer not null, time_update integer not null,
PRIMARY KEY (id) PRIMARY KEY (id)
); );
...@@ -229,7 +229,6 @@ def tweets(conn, Tweet, config): ...@@ -229,7 +229,6 @@ def tweets(conn, Tweet, config):
Tweet.timestamp, Tweet.timestamp,
Tweet.timezone, Tweet.timezone,
Tweet.place, Tweet.place,
Tweet.location,
Tweet.replies_count, Tweet.replies_count,
Tweet.likes_count, Tweet.likes_count,
Tweet.retweets_count, Tweet.retweets_count,
...@@ -237,7 +236,6 @@ def tweets(conn, Tweet, config): ...@@ -237,7 +236,6 @@ def tweets(conn, Tweet, config):
Tweet.user_id_str, Tweet.user_id_str,
Tweet.username, Tweet.username,
Tweet.name, Tweet.name,
Tweet.profile_image_url,
Tweet.link, Tweet.link,
",".join(Tweet.mentions), ",".join(Tweet.mentions),
",".join(Tweet.hashtags), ",".join(Tweet.hashtags),
...@@ -246,6 +244,8 @@ def tweets(conn, Tweet, config): ...@@ -246,6 +244,8 @@ def tweets(conn, Tweet, config):
",".join(Tweet.photos), ",".join(Tweet.photos),
Tweet.quote_url, Tweet.quote_url,
Tweet.video, Tweet.video,
Tweet.geo,
Tweet.near,
time_ms) time_ms)
cursor.execute('INSERT INTO tweets VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', entry) cursor.execute('INSERT INTO tweets VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)', entry)
...@@ -253,7 +253,7 @@ def tweets(conn, Tweet, config): ...@@ -253,7 +253,7 @@ def tweets(conn, Tweet, config):
query = 'INSERT INTO favorites VALUES(?,?)' query = 'INSERT INTO favorites VALUES(?,?)'
cursor.execute(query, (config.User_id, Tweet.id)) cursor.execute(query, (config.User_id, Tweet.id))
if Tweet.retweet == 1: if Tweet.retweet:
query = 'INSERT INTO retweets VALUES(?,?)' query = 'INSERT INTO retweets VALUES(?,?)'
cursor.execute(query, (config.User_id, Tweet.id)) cursor.execute(query, (config.User_id, Tweet.id))
......
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