fix sleep from seconds to minutes
This commit is contained in:
4
main.py
4
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):
|
||||
|
||||
Reference in New Issue
Block a user