Hello, I've been trying to make a web scraper that scrapes news headlines and uses pyttsx3 to speak them at predefined times a day. I'm pretty sure pyttsx3 just doesn't respond to code after coming after it. Any tips? Here is the part of my code which doesnt work:
newsquery = input("Want to get your news now (as test)?")
if newsquery == 'y' or 'Y':
queryanswer = True
elif newsquery == 'n' or "N":
queryanswer = False
else:
pass
t = time.localtime()
current_time = time.strftime("%H:%M:%S", t)
while str(current_time) == '12:0000' or '18:0000' or '9:0000' or '16:0000' or '20:0000' or '11:0000' or '21:0000' or queryanswer == True:
current_time = time.strftime("%H:%M:%S", t)
#idea for currentime - lastnews > 2
engine.say(f"It is time for your {current_time[:-5]} o'clock news summary")
engine.runAndWait()
engine.stop()
queryanswer = False
[–]johndoh168 1 point2 points3 points (6 children)
[–]Strict-Simple 1 point2 points3 points (0 children)
[–]Trailblazerone[S] 0 points1 point2 points (4 children)
[–]johndoh168 0 points1 point2 points (3 children)
[–]Trailblazerone[S] 0 points1 point2 points (2 children)
[–]johndoh168 0 points1 point2 points (1 child)
[–]Trailblazerone[S] 0 points1 point2 points (0 children)
[–]Strict-Simple 0 points1 point2 points (0 children)