From 08d4d664939490c1c278f566a008ddb2860e622b Mon Sep 17 00:00:00 2001 From: Vivek Santayana Date: Thu, 11 Nov 2021 10:19:59 +0000 Subject: [PATCH] debug interaction tweet search --- interaction/script.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/interaction/script.py b/interaction/script.py index a47f2a2..907902e 100644 --- a/interaction/script.py +++ b/interaction/script.py @@ -37,10 +37,10 @@ def searchTweets(query): def interactions(): tweets = searchTweets('persevering') + if not tweets: + print('No new tweets found.') + return for tweet in reversed(tweets): - if not tweets: - print('No new tweets found.') - return if re.search('what is.*if not.*persevering',tweet.text.lower()): if not tweet.text.lower().startswith('rt') and tweet.user != api.me(): print(f'Tweet {tweet.text} by @{tweet.author.screen_name}', flush = True)