diff options
| -rw-r--r-- | database.py | 8 | ||||
| -rwxr-xr-x | requirements.txt | 3 | 
2 files changed, 6 insertions, 5 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() diff --git a/requirements.txt b/requirements.txt index 534239e..0ce280b 100755 --- a/requirements.txt +++ b/requirements.txt @@ -1,7 +1,8 @@  itsdangerous==2.0.1  PyMySQL==1.0.2  python_qbittorrent==0.4.2 -Flask==2.1.0 +Werkzeug==2.3.7 +Flask==2.2.2  PiHole_api  transmission-clutch  dataclasses | 
