from PIL import ImageGrab
payloadimage = ImageGrab.grabclipboard()
payloadimage.save('/path/to/image/imagename.jpg', 'JPEG')
I need to change the name every time this chunk of code is run. In order to do that the name needs to be saved as a variable. However, how do I do this considering I have a path to the folder which I'm trying to save the name to?