[Python] How to avoid first browser new tab open delay with registered browser?

Discussão em 'Python' iniciado por Stack, Março 23, 2025.

  1. Stack

    Stack Membro Participativo

    If there are no browser processes open, it will open the first window then wait 5 seconds before openning the new tab. How do I minimise the delay. Note that this problem still occurs when openning an empty tab, so it's due to delay in openning the tab rather than lag from loading the website.

    import webbrowser
    webbrowser.register('Thorium', None, webbrowser.Chrome(path))
    Thorium = webbrowser.get('Thorium')
    Thorium.open(url1)
    Thorium.open_new_tab(url2)

    Continue reading...

Compartilhe esta Página