I want to make a while loop which uses time.sleep() every 5 minutes then continues the process. But the problem is that my code is not working properly. I'm using this code below. What can be the problem in my code and what should I do to make it work?
with open('url.txt', 'r', encoding='UTF-8', errors='ignore') as des:
description = des.readline()
timeout = time.time() + 60*5
while description:
test = 0
description = des.readline()
browser.get(description)
time.sleep(6)
if test == 5 or time.time() > timeout:
time.sleep(timeout)
continue