From 4bb7c15277d5d6970793b1775fe3584e14f3fa56 Mon Sep 17 00:00:00 2001 From: Daniel Tam Date: Sun, 26 May 2024 03:32:20 -0500 Subject: [PATCH] fix sleep from seconds to minutes --- main.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/main.py b/main.py index 4535988..5b66084 100644 --- a/main.py +++ b/main.py @@ -118,7 +118,7 @@ def check_reddit(config): # Debug message current_time = datetime.datetime.now() print_and_flush(f'Starting search at: {current_time.strftime("%Y-%m-%d %H:%M:%S")}') - + resp = requests.get(f'https://www.reddit.com/r/{subreddit}/new.json', headers=http_headers) if resp.status_code == 200: @@ -146,7 +146,7 @@ def check_reddit(config): # Send alert send_alert(config, title, text, url, timestamp, keyword) - time.sleep(config.get('interval')) + time.sleep(config.get('interval') * 60) # Send alert out def send_alert(config, title, text, url, timestamp, keyword):