Jul-19-2020, 05:30 AM
After it opens up the website it waits for the chrome process to end, then it does the wait. This was immediately obvious when I modified the program like this:
import webbrowser from time import sleep import os while 1: print('start chrome') chrome_path = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s' print('going to website') webbrowser.get(chrome_path).open('https://www.halowaypoint.com/en-us/news') print('sleep') sleep(10) print('kill chrome') os.system("taskkill /im chrome.exe /f") print('Wait again') sleep(10) print('repeat')It would be nice if programs worked, but people are stupid and make mistakes. That is why debugging is just as important as coding. I was stupid and could not spot why the program didn't work just by looking, but a few minutes spent adding some debug code exposed the problem right away.