mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2024-11-27 03:03:01 +00:00
bugfix for 50fed816dd
This commit is contained in:
parent
f6755419d1
commit
cc9d1493c6
1 changed files with 4 additions and 3 deletions
|
@ -1143,7 +1143,7 @@ def extract_info(self, url, download=True, ie_key=None, extra_info={},
|
||||||
else:
|
else:
|
||||||
self.report_error('no suitable InfoExtractor for URL %s' % url)
|
self.report_error('no suitable InfoExtractor for URL %s' % url)
|
||||||
|
|
||||||
def __handle_extraction_exceptions(func):
|
def __handle_extraction_exceptions(func, handle_all_errors=True):
|
||||||
def wrapper(self, *args, **kwargs):
|
def wrapper(self, *args, **kwargs):
|
||||||
try:
|
try:
|
||||||
return func(self, *args, **kwargs)
|
return func(self, *args, **kwargs)
|
||||||
|
@ -1163,7 +1163,7 @@ def wrapper(self, *args, **kwargs):
|
||||||
except (MaxDownloadsReached, ExistingVideoReached, RejectedVideoReached):
|
except (MaxDownloadsReached, ExistingVideoReached, RejectedVideoReached):
|
||||||
raise
|
raise
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if self.params.get('ignoreerrors', False):
|
if handle_all_errors and self.params.get('ignoreerrors', False):
|
||||||
self.report_error(error_to_compat_str(e), tb=encode_compat_str(traceback.format_exc()))
|
self.report_error(error_to_compat_str(e), tb=encode_compat_str(traceback.format_exc()))
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
@ -1369,7 +1369,8 @@ def iter_playlistitems(format):
|
||||||
|
|
||||||
def get_entry(i):
|
def get_entry(i):
|
||||||
return YoutubeDL.__handle_extraction_exceptions(
|
return YoutubeDL.__handle_extraction_exceptions(
|
||||||
lambda self, i: ie_entries[i - 1]
|
lambda self, i: ie_entries[i - 1],
|
||||||
|
False
|
||||||
)(self, i)
|
)(self, i)
|
||||||
|
|
||||||
entries = []
|
entries = []
|
||||||
|
|
Loading…
Reference in a new issue