From 1597d9d94e52d39bbc7a5ddfaff8bc4fc1b02423 Mon Sep 17 00:00:00 2001 From: Subhamoy Biswas Date: Fri, 7 Mar 2025 15:12:46 +0530 Subject: [PATCH] (refactor): loading texts are now richly rendered --- pytubepp/main.py | 12 ++++++------ requirements.txt | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/pytubepp/main.py b/pytubepp/main.py index 0a8f942..55fd294 100644 --- a/pytubepp/main.py +++ b/pytubepp/main.py @@ -437,10 +437,10 @@ def main(): # Handle info display flags if args.show_info: - print('Loading...') + rprint('Loading...') downloader.show_video_info(args.url) if args.list_stream: - print('Loading...') + rprint('Loading...') downloader.show_all_streams(args.url) if args.raw_info: downloader.show_raw_info(args.url, args.json_prettify) @@ -449,7 +449,7 @@ def main(): # Handle download cases if hasattr(args, 'stream') and hasattr(args, 'caption'): - print('Loading...') + rprint('Loading...') if downloader.set_video_info(args.url): if (args.caption not in downloader.captions.keys()) and (args.caption != 'none'): print('\nInvalid caption code or caption not available! Please choose a different caption...!! (use -i to see available captions)') @@ -466,7 +466,7 @@ def main(): else: downloader.download_stream(args.url, args.stream, args.caption) elif hasattr(args, 'stream'): - print('Loading...') + rprint('Loading...') if downloader.set_video_info(args.url): if downloader.default_caption == 'none': downloader.download_stream(args.url, args.stream) @@ -487,7 +487,7 @@ def main(): else: print('Download cancelled! exiting...!!') elif hasattr(args, 'caption'): - print('Loading...') + rprint('Loading...') if downloader.set_video_info(args.url): if (args.caption not in downloader.captions.keys()) and (args.caption != 'none'): print('\nInvalid caption code or caption not available! Please choose a different caption...!! (use -i to see available captions)') @@ -531,7 +531,7 @@ def main(): else: print('Sorry, No downloadable video stream found....!!!') elif not any([args.show_info, args.raw_info, args.json_prettify, args.list_stream]): # If no info flags are set - print('Loading...') + rprint('Loading...') if downloader.set_video_info(args.url): if downloader.default_stream == 'max' and downloader.maxres: if downloader.default_caption == 'none': diff --git a/requirements.txt b/requirements.txt index 148a018..0c572e7 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,8 +5,8 @@ mutagen tabulate tqdm appdirs +rich setuptools wheel twine -build -rich \ No newline at end of file +build \ No newline at end of file