From a177a92f958f9c11e45329ec5e9c49e048173431 Mon Sep 17 00:00:00 2001 From: AplhaSlayer1964 <62714929+AplhaSlayer1964@users.noreply.github.com> Date: Sun, 24 Oct 2021 21:19:06 -0400 Subject: [PATCH] Update kemono-dl.py --- kemono-dl.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/kemono-dl.py b/kemono-dl.py index 0f4645a..af7148b 100644 --- a/kemono-dl.py +++ b/kemono-dl.py @@ -101,14 +101,14 @@ def download_yt_dlp(path, link): ydl_opts = { "format" :"bestvideo+bestaudio", "outtmpl" : "{}/%(title)s.%(ext)s".format(path), - "noplaylist" : True, + "noplaylist" : True, # stops from downloading an entire youtube channel "merge_output_format" : "mp4" } with yt_dlp.YoutubeDL(ydl_opts) as ydl: ydl.download([link]) return 0 except: - print('Error with yt-dlp and link: {link}'.format(link)) # errors always ignored + print('Error with yt-dlp and link: {}'.format(link)) # errors always ignored return 1 def check_size(size): @@ -333,7 +333,7 @@ def save_post(post, info): return post_title = re.sub('[\\n\\t]+',' ', re.sub('[\\/:\"*?<>|]+','', post['title'] )).strip('.').strip() # removing illegal windows characters - post_folder = '[{}] [{id}] {}'.format(date_string, post_title, **post)[:248].strip() # shorten folder name length for windows + post_folder = '[{}] [{id}] {}'.format(date_string, post_title, **post)[:248].strip('.').strip() # shorten folder name length for windows post_path = os.path.join(info['path'], post_folder) if not os.path.exists(post_path): os.makedirs(post_path)