Tutorial Play Youtube Video Using Python and VLC

Опубликовано: 07 Январь 2020
на канале: RADAS
5,393
40

Don't forget to Like and Subscribe & Share This Video & comment below. Thanks ♥ Subscribe RADAS ♥ :    / @radas_official  
Tutorial Play Youtube Video Using Python and VLC
#install_requirement.sh
#!/bin/bash
sudo pip install pafy
sudo pip install youtube_dl
sudo pip install python-vlc
sudo apt-get install vlc

#play_demo.py
#!/usr/local/bin/python3
import pafy
import vlc
import time
url = "   • Tutorial Play Youtube Video Using Pyt...  "
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()
time.sleep(120)

Please send feedback to my email: [email protected] if you have any problems.
Good lucky!
Thank you so much.