for this tutorial we will use pywhatkit library
you can install it by
pip install pywhatkit
import pywhatkit
pywhakit.playonyt('godzilla eminem')
and done.
if you don't want to open it in browser so just set open_video
to False, just like this:-
import pywhatkit
print(pywhatkit.playonyt('godzilla eminem',open_video=False))
Top comments (2)
There is a typo with the name of module. It miss a 't', as
import pywhatkit
.Corrected :-)