From 92343183c5bb47bd1546007ba3412d213cbbccd0 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Fri, 2 Aug 2019 19:23:36 +0200 Subject: [PATCH] Ignore errors during the download --- royalnet/audio/ytdlfile.py | 3 ++- royalnet/audio/ytdlinfo.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/royalnet/audio/ytdlfile.py b/royalnet/audio/ytdlfile.py index 23dc1fc9..03f04880 100644 --- a/royalnet/audio/ytdlfile.py +++ b/royalnet/audio/ytdlfile.py @@ -13,7 +13,8 @@ class YtdlFile: "quiet": True, # Do not print messages to stdout. "noplaylist": True, # Download single video instead of a playlist if in doubt. "no_warnings": True, # Do not print out anything for warnings. - "outtmpl": "%(title)s-%(id)s.%(ext)s" # Use the default outtmpl. + "outtmpl": "%(title)s-%(id)s.%(ext)s", # Use the default outtmpl. + "ignoreerrors": True # Ignore unavailable videos } def __init__(self, diff --git a/royalnet/audio/ytdlinfo.py b/royalnet/audio/ytdlinfo.py index 0ea0cbb8..57dcd3b2 100644 --- a/royalnet/audio/ytdlinfo.py +++ b/royalnet/audio/ytdlinfo.py @@ -13,7 +13,8 @@ class YtdlInfo: "quiet": True, # Do not print messages to stdout. "noplaylist": True, # Download single video instead of a playlist if in doubt. "no_warnings": True, # Do not print out anything for warnings. - "outtmpl": "%(title)s-%(id)s.%(ext)s" # Use the default outtmpl. + "outtmpl": "%(title)s-%(id)s.%(ext)s", # Use the default outtmpl. + "ignoreerrors": True # Ignore unavailable videos } def __init__(self, info: typing.Dict[str, typing.Any]):