I have some links in a list and I need to open all these links in my browser
import webbrowser
browserpath='C:\Program Files (x86)\Google\Chrome\Application\chrome.exe %s'
lis=[ITS FILLED WITH LINK ADDRESSES]
for site in lis:
webbrowser.get(browserpath).open_new_tab(site)
it just executes and finishing the program but nothing opens
I'm using Python 3.11.1
upd.
It seems it's working fine without webbrowser.get()
Another question is: how would I specify which browser I need them to be opened with? If I need to open it with Firefox I would try:
import webbrowser
lis = ["https://www.google.com", "https://www.youtube.com", "https://www.facebook.com"]
fire="C:\programs\Browser\firefox.exe %s"
for site in lis:
webbrowser.get(fire).open_new_tab(site)
but it doesn't work too, can you explain it to me please?