You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

19 lines
546 B

import time
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By
chrome_options = Options()
chrome_options.add_argument('--headless')
chrome_options.add_argument('--no-sandbox')
driver = webdriver.Chrome('/usr/lib/chromium-browser/chromedriver', options=chrome_options)
driver.get('https://sensors.dns.t0.vc')
time.sleep(3)
element = driver.find_element(By.ID, 'Solar_Power')
with open('image.png', 'wb') as f:
f.write(element.screenshot_as_png)
driver.close()