I just got a new job working remotely and I have to start my day by opening a bunch of pages and logging into them. I would love to automate this process as it can be kind of tedious. I would like to leave my personal browsing window alone and open a new window with all of the pages I need. Here is the gist of what I'm trying to do:
import webbrowser
first = True
chromePath = 'C:/Program Files (x86)/Google/Chrome/Application/chrome.exe %s'
URLS = ("first page", "second page", "third page")
for url in URLS:
if first:
webbrowser.get(chromePath).open(url)
first = False
else:
webbrowser.open(url, new=2)
For some reason this code is just opening new tabs in my current browser, which is basically the opposite of what I want it to be doing. What is going on?