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