Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Hi I have the code below using pafy and vlc in order to play a youtube video however after running the code I get the
Hi I have the code below using pafy and vlc in order to play a youtube video however after running the code I get the error shown in the picture. How do I fix this problem so that it will show the youtube video. I'm using Pycharm
import pafy import vlc url = "https://www.youtube.com/watch?v=Y7I1nCcwJP0" video = pafy.new(url) best = video.getbest() playurl = best.url Instance = vlc.Instance() player = Instance.media_player_new() Media = Instance.media_new(playurl) Media.get_mrl() player.set_media(Media) player.play()Traceback (most recent call last): File " import youtube_dl ModuleNotFoundError: No module named 'youtube_dl' line 48, in
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started