'im not able to save the screen shot from python
kindly help me im not able to save the screen shot on the desired folder the code is running however the screen shot is not saving on the path please help
import pyscreenshot as ImageGrab
# part of the screen
time.sleep(2)
#(left_x, top_y, right_x, bottom_y).
#screen shot of the required place
path= (r'C:\Users\RTambe00000\Desktop\python basics\web scraping\Pyautogui\photos')
im=ImageGrab.grab(bbox=(900,1000,1200,1100))
im= im.resize((224,224),Image.ANTIALIAS)
im.save(path+'.jpeg')
Solution 1:[1]
hi i was able to solve it and got my code working
def takescreenshot():
#image_name= f"im-{str(datetime.datetime.now())}"
path= (r'C:\Users\RTamb\Desktop\python basics\web scraping\Pyautogui\photos\{image_name}.png')
im=ImageGrab.grab(bbox=(955,1032,1130,1050))
im.save(path)
takescreenshot()
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | Rohan tambe |
