import mss
import numpy as np
with mss.mss() as sct:
monitor = {"top": 160, "left": 160, "width": 160, "height": 135}
img_array = np.array(sct.grab(monitor))
# Do whatever you want...
import pyautogui
im2 = pyautogui.screenshot('my_screenshot.png', region=(x,y, width, height))