code-dumps/py/url-check-selenium.py
2023-03-29 13:59:25 +08:00

12 lines
280 B
Python
Executable File

#!/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()