Skip to content

A simple Python-based tool that automatically refreshes a webpage at specified intervals using Selenium WebDriver. This project includes scripts for both ChromeDriver and SafariDriver. Users can set the URL, refresh interval, and number of refresh cycles via prompts. Ideal for automating webpage refresh tasks.

Notifications You must be signed in to change notification settings

RockENZO/automatically-refresh-profile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Webpage Auto-Refresher

This project contains scripts to automatically refresh a webpage at specified intervals using Selenium WebDriver. Two versions of the script are provided: one using ChromeDriver and another using SafariDriver.

Prerequisites

  • Python 3.x
  • Selenium package
  • ChromeDriver (for refresh.py)
  • SafariDriver (for refresh_with_safari.py)

Installation

  1. Install Selenium:

    pip install selenium
  2. Download ChromeDriver:

    • Download the appropriate version of ChromeDriver for your operating system from here.
    • Place the chromedriver executable in a known location and update the CHROMEDRIVER_PATH in refresh.py.
  3. Enable SafariDriver:

    • SafariDriver comes pre-installed with Safari on macOS.
    • Enable "Allow Remote Automation" in Safari's Develop menu.

Usage

Using ChromeDriver

  1. Edit refresh.py:

    • Update the CHROMEDRIVER_PATH variable to the path where your chromedriver is located.
  2. Run the script:

    python refresh.py
  3. Follow the prompts:

    • Enter the URL you want to refresh.
    • Enter the refresh interval (in seconds).
    • Enter the number of times to refresh.

Using SafariDriver

  1. Run the script:

    python refresh_with_safari.py
  2. Follow the prompts:

    • Enter the URL you want to refresh.
    • Enter the refresh interval (in seconds).
    • Enter the number of times to refresh.

Example

Enter the URL you want to refresh: https://example.com
Enter the refresh interval (in seconds): 10
Enter the number of times to refresh: 5

The script will open the specified URL in the browser and refresh it at the specified interval for the specified number of times.

Notes

  • Ensure that the web drivers are properly installed and configured.
  • For Safari, make sure "Allow Remote Automation" is enabled in the Develop menu.

License

This project is licensed under the MIT License.

About

A simple Python-based tool that automatically refreshes a webpage at specified intervals using Selenium WebDriver. This project includes scripts for both ChromeDriver and SafariDriver. Users can set the URL, refresh interval, and number of refresh cycles via prompts. Ideal for automating webpage refresh tasks.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages