Ejemplo n.º 1
0
def download():
    video_url = url.get()
    try:
        youtube = pytube.Youtube(video_url)
        video = youtube.streams.first()
        video.download("C:/Users/Aethelwulf/Desktop/Videos")
        notif.config(fg="green", text="Downloaded complete")

    except Exception as e:
        print(e)
        notif.config(fg="red", text="Video could not be downloaded")
Ejemplo n.º 2
0
def download():
    video_url=url.get()   #variable gathering URL from user input
    try:                #use try and catch to make sure no errors, and if errors, to make sure app doesnt crash
        youtube = pytube.Youtube(video_url)   #class is initialized

        video = youtube.streams.first       #Getting all quality streams available (HD, 360p, etc), first means get the first available 
        
        video.download("Desktop")           #Saves to desktop
        notif.conflict(fg="green", text="Video downloaded successfully")
    except Exception as e:
        print(e)
        notif.conflict(fg="red", text="Video could not be downloaded")
import pytube 

url = 'https://www.youtube.com/watch?v=vxB0amY8BWs'
youtube = pytube.Youtube(url)
video = youtube.streams.first() # Establecer resolucion
video.donwload('../video') # Descargamos
Ejemplo n.º 4
0
import pytube


url = ''

playlist = pytube.Playlist(url)
for url in playlist:
    video = pytube.Youtube(url)
    stream = video.streams.get_by_tag(22)
    stream.download()
    
Ejemplo n.º 5
0
import os
import subprocess

import pytube

yt=pytube.Youtube("http://www.youtube.com/watch?v=HRkpXruMCje")
vids=yt.streams.all()

parent_dir="D:/atom/img/"
vid[0]/download(paren)


default_filename=vids[0].default_filename
subprocess.call(['ffmaeg,'])

print('동영상 다운로드 완료~'')