pythongoogle-chromepython-webbrowser

Python 2's webbrowser is not working in repl.it


I am using repl.it, and also the webbrowser module to open a link using webbrowser.open("https://google.com/") But, my link doesn't work. Can you help me with this?

import webbrowser
webbrowser.open("https://google.com/", 2)

Solution

  • You can simplify the answer like this:

    import webbrowser
    webbrowser.open(*website*)
    

    Of course, replace * website * with the site and no need to write the 2. Then tell me if it works.

    And by the way, some online python processor like pythonanywhere do not allow opening all websites. Instead, they only allow some specific websites.