Skip to content

Instantly share code, notes, and snippets.

@GadgetSteve
Created July 13, 2017 09:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save GadgetSteve/5cb2d74f9ea581e87a6adebed9896dc3 to your computer and use it in GitHub Desktop.
Save GadgetSteve/5cb2d74f9ea581e87a6adebed9896dc3 to your computer and use it in GitHub Desktop.
Demo of timed screenshots
import datetime
import date
import pyscreenshot
INTERVAL = 30 # Time in seconds between screenshots
while True:
now = datetime.datetime.now() # Get timestamp
filename = now.strftime('screenshot_%Y_%m_%d_%H_%M_%S.png') # Create a filename
pyscreenshot.grab_to_file(filename) # take the screenshot
time.sleep(INTERVAL)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment