diff --git a/random/visitor.py b/random/visitor.py new file mode 100644 index 0000000..315ae1a --- /dev/null +++ b/random/visitor.py @@ -0,0 +1,15 @@ +import webbrowser +import time +import keyboard + +count = x # number of times you want to open a tab +secs = x # time after which a tab is to be closed + +url = 'xyz' + +for _ in range (count): + # opens a new tab + webbrowser.open(url, new=0) + # closes the tab after some time + time.sleep(secs) + keyboard.press_and_release('Ctrl + W') \ No newline at end of file