Created
September 7, 2018 23:47
-
-
Save Choco02/a6e472dd4fad05de3ec61c9a2ee88ed3 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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