code-dumps/py/url-check-selenium.py

12 lines
280 B
Python
Raw Normal View History

2023-03-29 13:59:25 +08:00
#!/usr/bin/python3
from selenium import webdriver
url = "https://blog.headdesk.me"
options = webdriver.ChromeOptions()
options.add_argument('ignore-certificate-errors')
driver = webdriver.Chrome(options=options)
driver.get(url)
driver.save_screenshot("site.png")
driver.close()