Skip to content

joaofilho21/youtube-download

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

youtube-download

Download simples de vídeos e playlists do YouTube usando a biblioteca PyTube

Instalação

pipenv install

Download de um vídeo

def download_video(video_url):
	yt = YouTube(video_url)
	video = yt.streams.get_highest_resolution()
	video.download()

Download de uma playlist

def download_playlist(playlist_url):
	playlist = Playlist(playlist_url)
	for url in playlist:
		yt = YouTube(url)
		video = yt.streams.get_highest_resolution()
		video.download(output_path='playlist')

Download do áudio

def download_audio(video_url):
	yt = YouTube(video_url)
	audio = yt.streams.filter(only_audio=True)[0]
	audio.download()

About

Estudo

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%