Created
July 13, 2017 09:17
-
-
Save GadgetSteve/5cb2d74f9ea581e87a6adebed9896dc3 to your computer and use it in GitHub Desktop.
Demo of timed screenshots
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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