Skip to content

Instantly share code, notes, and snippets.

@mzughbor
Created November 5, 2020 02:33
Show Gist options
  • Save mzughbor/fd4f7fb3ad0f704f72325ace8f14f83f to your computer and use it in GitHub Desktop.
Save mzughbor/fd4f7fb3ad0f704f72325ace8f14f83f to your computer and use it in GitHub Desktop.
try:
from pytube import YouTube
from pytube import Playlist
except Exception as e :
print( " Some Modules are missing {}".format(e))
#url = "https://www.youtube.com/watch?v=U0fk5L1ifbo"
url = "https://www.youtube.com/watch?v=p2L0i5_WTCM"
ytd = YouTube(url)
for x in ytd.streams.filter( file_extension = "mp4" ).order_by('resolution').desc():# if y want specific res = "720p" ...
print(x)
#print('Number of views: ',ytd.views)
#print("Description: ",ytd.description)
#print("Ratings: ",ytd.rating)
ytd.streams[0].download("D:\Dance\Videoes")
#print(ytd)
#
# #Main Screen
# master = Tk()
# master.title("youtube video downloader...")
#
#
# #Labels
# Label(master, text="Youtube Video Converter", fg="red", font=("Calibri", 15)).grid(sticky=N, padx=100, row=0)
# Label(master, text="Please enter the link to your video below:", font=("Calibri", 10)).grid(sticky=N, pady=10, row=1)
# notif = Label(master, font=("Calibri",12))
# notif.grid(sticky=N, pady=1, row=4)
# #Entry
# url = StringVar()
# Entry(master, width=45,textvar=url).grid(sticky=N,row=2)
# Button(master,width=20, text="Download",font=("Calibri",12),command=download).grid(sticky=N, row=3, pady=15 )
#
# master.mainloop()
#
@mzughbor
Copy link
Author

mzughbor commented Nov 5, 2020

LET'S TRY SOME CODE WITH PYTHON TO DEVELOP YOUTUBE DOWNLOADS TO BE FASTER AND SCHEDULE THESE LINKS TO BE IN ONE SHEET

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment