Automate the Boring Stuff with Python
https://automatetheboringstuff.com/2e/chapter20Getting a Screenshot. To take screenshots in Python, call the pyautogui.screenshot() function. Enter the following into the interactive shell: >>> import pyautogui >>> im = pyautogui.screenshot() The im variable will contain the Image object of the screenshot. You can now call methods on the Image object in the im variable, just like any other ...