Compare commits
2 Commits
8dce70d9d0
...
ed38f1fafe
Author | SHA1 | Date |
---|---|---|
Tanner Collin | ed38f1fafe | 1 year ago |
Tanner Collin | 6b1a23271b | 1 year ago |
4 changed files with 107 additions and 1 deletions
@ -0,0 +1,25 @@ |
|||||||
|
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files. |
||||||
|
|
||||||
|
# dependencies |
||||||
|
/node_modules |
||||||
|
/.pnp |
||||||
|
.pnp.js |
||||||
|
|
||||||
|
# testing |
||||||
|
/coverage |
||||||
|
|
||||||
|
# production |
||||||
|
/build |
||||||
|
|
||||||
|
# misc |
||||||
|
.DS_Store |
||||||
|
.env.local |
||||||
|
.env.development.local |
||||||
|
.env.test.local |
||||||
|
.env.production.local |
||||||
|
|
||||||
|
npm-debug.log* |
||||||
|
yarn-debug.log* |
||||||
|
yarn-error.log* |
||||||
|
|
||||||
|
image.png |
@ -0,0 +1,19 @@ |
|||||||
|
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() |
Loading…
Reference in new issue