[Python] How to automate regular screenshots on Chrome with Selenium

Discussão em 'Python' iniciado por Stack, Junho 27, 2025.

  1. Stack

    Stack Membro Participativo

    I have URLs that I screenshot and save periodically.

    I came across a python solution using "Selenium" and I have questions.

    Is there a script available that I could amend that would enable me to:


    • Screenshot and store the image of a list of URLs


    • Automate this process so it occurs in periodically

    This is code that I found and amended:

    from selenium import webdriver
    from time import sleep
    driver = webdriver.Chrome()
    driver.get('URL')
    sleep(1)
    driver.get_screenshot_as_file("FW.png")
    driver.quit()
    print("end...")


    I believe I may have errors.

    Continue reading...

Compartilhe esta Página