Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
from selenium import webdriver
driver = webdriver.Chrome()
driver.get("https://one-shore.com/")
element = driver.find_element_by_css_selector(".oneshore.logo")
element.screenshot("logo.png")
driver.quit()
from PIL import Image
image = Image.open("logo.png")
pixels = image.load()
top_left = (0,0)
bottom_right = bottom_right = tuple(( i-1 for i in (image.size)))
mid_point = tuple((int(i/2) for i in (image.size)))
print(pixels[top_left])
print(pixels[bottom_right])
print(pixels[mid_point])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment