Hit any url or website using webbrowser module in python

 Open any url or website using webbrowser module in python

First of all we need to install webbrowser module using below command

pip install webbrowser

After installed webbrowser module we can use it in our any python program where we want to use it.

Here we will open youtube using this webbrowser module

open_youtube.py

import webbrowser
chrome_path ="C:/Program Files (x86)/Google/Chrome/Application/chrome.exe"+" %s"
url ='https://www.youtube.com'
webbrowser.get(chrome_path).open(url)


To run this program we have to run given below command line
python open_youtube.py


Comments