added functino to get content from database
This commit is contained in:
+7
-1
@@ -169,4 +169,10 @@ def insert_list(username_list, timestamp_list, content_list):
|
||||
}
|
||||
dt.insert(val_dict)
|
||||
except Exception as e:
|
||||
logging.warning(e)
|
||||
logging.warning(e)
|
||||
|
||||
def get_content():
|
||||
with Data_table() as dt:
|
||||
query = f'SELECT * FROM {dt._name} ORDER BY time DESC '
|
||||
df = pd.read_sql_query(query, dt.con)
|
||||
return df['content']
|
||||
Reference in New Issue
Block a user