Created
November 5, 2020 02:33
-
-
Save mzughbor/fd4f7fb3ad0f704f72325ace8f14f83f to your computer and use it in GitHub Desktop.
This file contains 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
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() | |
# |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
LET'S TRY SOME CODE WITH PYTHON TO DEVELOP YOUTUBE DOWNLOADS TO BE FASTER AND SCHEDULE THESE LINKS TO BE IN ONE SHEET