Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import pafy
- import vlc
- #url = "https://www.youtube.com/watch?v=WvV5TbJc9tQ"
- #video = pafy.new(url)
- #best = video.getbest()
- #playurl = best.url
- #media = vlc.MediaPlayer(playurl)
- #media.play()
- #Instance = vlc.Instance()
- #player = Instance.media_player_new()
- #Media = Instance.media_new(playurl)
- #Media.get_mrl()
- #player.set_media(Media)
- #player.play()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement