Skip to content

Instantly share code, notes, and snippets.

@colemilne54
Created October 9, 2017 02:19
Show Gist options
  • Save colemilne54/cb3fa9b108893ebeca80d3518b366cce to your computer and use it in GitHub Desktop.
Save colemilne54/cb3fa9b108893ebeca80d3518b366cce to your computer and use it in GitHub Desktop.
Every 2 hours a YouTube video plays in a new browser tab and double clicks to get the video to full screen. This task will be performed 3 times before the program is done.
import time
import webbrowser
import pyautogui
breaks = 0
print("This program started on " + time.ctime())
while (breaks < 3):
time.sleep(7200)
webbrowser.open("https://www.youtube.com/watch?v=9Ei89MsnCd0");
breaks = breaks + 1
pyautogui.click(clicks=2, interval=0.25)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment