player = vlc.Instance()
media_player = player.media_player_new()
vid = None
inp = input(">>>")
def readurl(query):
url= findurl(query)
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()
readurl(inp)
When i run this program and i give it an input it prints out an ERROR: No video formats found.
I know that there is a problem with youtube-dl but pafy uses it and i wonder if there is a work around it, or at least if i can somehow make pafy use the yt-dlp