Skip to content

Instantly share code, notes, and snippets.

@Choco02
Created September 7, 2018 23:47
Show Gist options
  • Save Choco02/a6e472dd4fad05de3ec61c9a2ee88ed3 to your computer and use it in GitHub Desktop.
Save Choco02/a6e472dd4fad05de3ec61c9a2ee88ed3 to your computer and use it in GitHub Desktop.
from pytube import YouTube #Precisa da biblioteca pytube
from time import sleep
try:
f = open('link do video.txt', 'r')
except FileNotFoundError:
open('link do video.txt', 'w')
f = open('link do video.txt', 'r')
local = f.read()
if local == '':
print('Por favor coloque um link de video do Youtube no arquivo "link do video.txt" e reinicie o programa')
sleep(10)
exit()
else:
print('Download iniciado... Espere até terminar')
print('Criado por Choco02')
YouTube(local).streams.first().download()
print('Done ✔')
sleep(6)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment