Created
September 22, 2021 19:32
-
-
Save fijiaaron/e0c2464509625f06a7264e6d2c5a7621 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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