Skip to content

Instantly share code, notes, and snippets.

@fijiaaron
Created September 22, 2021 19:32
Show Gist options
  • Save fijiaaron/e0c2464509625f06a7264e6d2c5a7621 to your computer and use it in GitHub Desktop.
Save fijiaaron/e0c2464509625f06a7264e6d2c5a7621 to your computer and use it in GitHub Desktop.
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