From 2689900375f98cd4e92124ea2868b8a02d5ceefd Mon Sep 17 00:00:00 2001 From: Cyberes Date: Sat, 6 May 2023 23:22:02 -0600 Subject: [PATCH] remove unavailable video check --- downloader.py | 2 +- process/threads.py | 4 ++-- requirements.txt | 3 ++- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/downloader.py b/downloader.py index 3cb785b..d32bb41 100755 --- a/downloader.py +++ b/downloader.py @@ -372,7 +372,7 @@ while True: playlist_ydl_opts = ydl_opts.copy() # playlist_ydl_opts['outtmpl'] = f'{output_path}/{get_output_templ()}' - + if len(download_queue): # Don't mess with multiprocessing if all videos are already downloaded with Pool(processes=args.threads) as pool: if sys.stdout.isatty(): diff --git a/process/threads.py b/process/threads.py index c03b887..f2d8284 100644 --- a/process/threads.py +++ b/process/threads.py @@ -96,7 +96,7 @@ def download_video(args) -> dict: output_dict = {'downloaded_video_id': None, 'video_id': video['id'], 'video_critical_err_msg': [], 'video_critical_err_msg_short': [], 'status_msg': [], 'logger_msg': []} # empty object - if not kwargs['ignore_downloaded'] and not video['channel_id'] or not video['channel'] or not video['channel_url'] or 'uploader' not in video.keys(): + if not kwargs['ignore_downloaded'] and not video['channel_id'] or not video['channel'] or not video['channel_url']: if video['duration'] or isinstance(video['view_count'], int): # Sometimes videos don't have channel_id, channel, or channel_url but are actually valid. Like shorts. pass @@ -135,7 +135,7 @@ def download_video(args) -> dict: # We created a new dict video['title'] = unidecode(video['title']) - video['uploader'] = unidecode(video['uploader']) # now the additional info is present since we fetched it + video['uploader'] = unidecode(video['uploader']) # now this info is present since we fetched it video_filename = remove_special_chars_linux(ydl.get_output_templ(video_id=video['id'], title=video['title'], uploader=video['uploader'], uploader_id=video['uploader_id'], include_ext=False), special_chars=['/']) diff --git a/requirements.txt b/requirements.txt index caecef3..af3c228 100644 --- a/requirements.txt +++ b/requirements.txt @@ -7,4 +7,5 @@ pyyaml appdirs phantomjs unidecode -ffmpeg-python \ No newline at end of file +ffmpeg-python +hurry.filesize \ No newline at end of file