@ -56,6 +56,7 @@ from .utils import (
DEFAULT_OUTTMPL ,
DEFAULT_OUTTMPL ,
determine_ext ,
determine_ext ,
determine_protocol ,
determine_protocol ,
DownloadCancelled ,
DownloadError ,
DownloadError ,
encode_compat_str ,
encode_compat_str ,
encodeFilename ,
encodeFilename ,
@ -1320,7 +1321,7 @@ class YoutubeDL(object):
self . to_stderr ( ' \r ' )
self . to_stderr ( ' \r ' )
self . report_warning ( ' The download speed is below throttle limit. Re-extracting data ' )
self . report_warning ( ' The download speed is below throttle limit. Re-extracting data ' )
return wrapper ( self , * args , * * kwargs )
return wrapper ( self , * args , * * kwargs )
except ( MaxDownloadsReached, ExistingVideoReached , RejectedVideoReach ed, LazyList . IndexError ) :
except ( DownloadCancell ed, LazyList . IndexError ) :
raise
raise
except Exception as e :
except Exception as e :
if self . params . get ( ' ignoreerrors ' ) :
if self . params . get ( ' ignoreerrors ' ) :
@ -2949,14 +2950,8 @@ class YoutubeDL(object):
url , force_generic_extractor = self . params . get ( ' force_generic_extractor ' , False ) )
url , force_generic_extractor = self . params . get ( ' force_generic_extractor ' , False ) )
except UnavailableVideoError :
except UnavailableVideoError :
self . report_error ( ' unable to download video ' )
self . report_error ( ' unable to download video ' )
except MaxDownloadsReached :
except DownloadCancelled as e :
self . to_screen ( ' [info] Maximum number of downloads reached ' )
self . to_screen ( f ' [info] { e . msg } ' )
raise
except ExistingVideoReached :
self . to_screen ( ' [info] Encountered a video that is already in the archive, stopping due to --break-on-existing ' )
raise
except RejectedVideoReached :
self . to_screen ( ' [info] Encountered a video that did not match filter, stopping due to --break-on-reject ' )
raise
raise
else :
else :
if self . params . get ( ' dump_single_json ' , False ) :
if self . params . get ( ' dump_single_json ' , False ) :