diff options
author | jwansek <eddie.atten.ea29@gmail.com> | 2023-10-17 10:41:23 +0000 |
---|---|---|
committer | jwansek <eddie.atten.ea29@gmail.com> | 2023-10-17 10:41:23 +0000 |
commit | 5deb277fd9d7403b0e6611dc214c3bde7819fb9a (patch) | |
tree | c9c13cc44ae7b77834fc92fb132ef2a02db1e10f /database.py | |
parent | 765f681cecfcd2ca0d0de5a3a44d30e7476277e6 (diff) | |
download | eda.gay-5deb277fd9d7403b0e6611dc214c3bde7819fb9a.tar.gz eda.gay-5deb277fd9d7403b0e6611dc214c3bde7819fb9a.zip |
Fixed bug with diary
Diffstat (limited to 'database.py')
-rw-r--r-- | database.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/database.py b/database.py index f3a181c..d21ae37 100644 --- a/database.py +++ b/database.py @@ -233,7 +233,7 @@ class Database: with self.__connection.cursor() as cursor: # cursor.execute("SELECT tweet_id, tweeted_at, tweet FROM diary WHERE replying_to IS NULL ORDER BY tweeted_at DESC;") # attempt to ignore curiouscat automatic tweets by comparing with the q&a table - cursor.execute("SELECT tweet_id, tweeted_at, tweet FROM diary WHERE replying_to IS NULL AND tweet_id NOT IN (SELECT tweet_id FROM diary INNER JOIN qnas ON SUBSTRING(tweet, 1, 16) = SUBSTRING(question, 1, 16)) AND account = %s ORDER BY tweeted_at DESC;", (account, )) + cursor.execute("SELECT tweet_id, tweeted_at, tweet FROM diary WHERE replying_to IS NULL AND tweet_id NOT IN (SELECT tweet_id FROM diary INNER JOIN qnas ON SUBSTRING(tweet, 1, 16) = SUBSTRING(question, 1, 16)) AND account IN %s ORDER BY tweeted_at DESC;", ([account, "HONMISGENDERER"], )) for tweet_id, tweeted_at, tweet_text in cursor.fetchall(): # print(tweet_id, tweeted_at, tweet_text) out[tweeted_at] = [{ @@ -344,7 +344,7 @@ def update_cache(): if __name__ == "__main__": - #with Database() as db: - # print(db.get_cached_tweets(7)) + with Database() as db: + print(db.get_diary()) + - update_cache() |