Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
A little python script to refresh a given URL every 10 seconds
#! /usr/bin/env python3
import webbrowser
from time import sleep
url = input('Input the URL to reload, including "http://: ')
while True:
print("refreshing...")
webbrowser.open(url, new=0)
sleep(10)
@sposterkil

This comment has been minimized.

Copy link
Owner Author

sposterkil commented Jun 10, 2016

Heads up, this script may open a new tab on every refresh... It's not supposed to, but it is on my machine

@Alphaoo1

This comment has been minimized.

Copy link

Alphaoo1 commented Jun 29, 2020

Yes, this does open up new tabs.
But thanks for the code.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.