python mss
v10.0.0

from mss import mss
# The simplest use, save a screenshot of the 1st monitor
with mss () as sct :
sct . shot ()使用CTYPES在纯Python中的超快速跨平台多个屏幕截图模块。
您可以使用PIP安装它:
python -m pip install -U --user mss或者,您可以与Conda安装:
conda install -c conda-forge python-mss