diff --git a/CliYoutubeDownloader/CliYoutubeDownloader.py b/CliYoutubeDownloader/CliYoutubeDownloader.py index 81c35a81ad8..d155f25cf0f 100644 --- a/CliYoutubeDownloader/CliYoutubeDownloader.py +++ b/CliYoutubeDownloader/CliYoutubeDownloader.py @@ -6,7 +6,7 @@ class YouTubeDownloder: def __init__(self): - self.url = str(input("Enter the url of video : ")) + self.url = str(input("Enter the URL of video : ")) self.youtube = pytube.YouTube( self.url, on_progress_callback=YouTubeDownloder.onProgress ) @@ -28,14 +28,14 @@ def showStreams(self): self.chooseStream() def chooseStream(self): - self.choose = int(input("please select one : ")) + self.choose = int(input("Please select one : ")) self.validateChooseValue() def validateChooseValue(self): if self.choose in range(1, self.streamNo): self.getStream() else: - print("please enter a correct option on the list.") + print("Please enter a correct option on the list.") self.chooseStream() def getStream(self): @@ -49,7 +49,7 @@ def getFileSize(self): def getPermisionToContinue(self): print( - "\n title : {0} \n author : {1} \n size : {2:.2f}MB \n resolution : {3} \n fps : {4} \n ".format( + "\n Title : {0} \n Author : {1} \n Size : {2:.2f}MB \n Resolution : {3} \n FPS : {4} \n ".format( self.youtube.title, self.youtube.author, file_size, @@ -57,7 +57,7 @@ def getPermisionToContinue(self): self.stream.fps, ) ) - if input("do you want it ?(defualt = (y)es) or (n)o ") == "n": + if input("Do you want it ?(default = (y)es) or (n)o ") == "n": self.showStreams() else: self.main() @@ -69,7 +69,7 @@ def download(self): def onProgress(stream=None, chunk=None, remaining=None): file_downloaded = file_size - (remaining / 1000000) print( - f"downloading ... {file_downloaded/file_size*100:0.2f} % [{file_downloaded:.1f}MB of {file_size:.1f}MB]", + f"Downloading ... {file_downloaded/file_size*100:0.2f} % [{file_downloaded:.1f}MB of {file_size:.1f}MB]", end="\r", )