1from PIL import image
2
3img = image.open('C:\Users\you\path\to\your\image.jpg')
4pix = img.getpixel((100,100))
5img.putpixel((0,0),(0,0,255))
1import urllib.request
2from random import *
3import random,string
4from selenium import webdriver
5
6try:
7 Image1 = driver.find_element_by_xpath('//*[@id="ivLargeImage"]/img').get_attribute('src')
8 len1 = 10 #Will be the number of characters in image name
9 letters1 = string.ascii_lowercase
10 img1_name = ''.join(random.choice(letters1) for i in range(len1)) #making random names here
11 full1_name = str(img1_name) + '.jpg'
12 file1_path = 'C:\Users\Cord\Desktop\\' + full1_name
13 urllib.request.urlretrieve(Image1,file1_path)
14except:
15 Image1 = 'No Image'
16 full1_name = 'No Image'
17 print(Image1)