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

12 lines
280 B
Python
Raw Normal View History

2024-10-24 23:09:21 +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()