aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-07-21 01:00:46 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-07-21 01:04:53 +0530
commit50fed816dd5ae970d69d8997eb854d475ed91ede (patch)
tree8f7b7b432215db95577ff29ecf8418c34ac78af7
parenta1a7907bc0f70ee41bc9c9ec1c66ae6f4e363e25 (diff)
downloadhypervideo-pre-50fed816dd5ae970d69d8997eb854d475ed91ede.tar.lz
hypervideo-pre-50fed816dd5ae970d69d8997eb854d475ed91ede.tar.xz
hypervideo-pre-50fed816dd5ae970d69d8997eb854d475ed91ede.zip
Errors in playlist extraction should obey `--ignore-errors`
Related: https://github.com/yt-dlp/yt-dlp/issues/535#issuecomment-883277272, https://github.com/yt-dlp/yt-dlp/issues/518#issuecomment-881794754
-rw-r--r--yt_dlp/YoutubeDL.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/yt_dlp/YoutubeDL.py b/yt_dlp/YoutubeDL.py
index acb508b98..9da607b17 100644
--- a/yt_dlp/YoutubeDL.py
+++ b/yt_dlp/YoutubeDL.py
@@ -1363,13 +1363,18 @@ class YoutubeDL(object):
if not isinstance(ie_entries, (list, PagedList)):
ie_entries = LazyList(ie_entries)
+ def get_entry(i):
+ return YoutubeDL.__handle_extraction_exceptions(
+ lambda self, i: ie_entries[i - 1]
+ )(self, i)
+
entries = []
for i in playlistitems or itertools.count(playliststart):
if playlistitems is None and playlistend is not None and playlistend < i:
break
entry = None
try:
- entry = ie_entries[i - 1]
+ entry = get_entry(i)
if entry is None:
raise EntryNotInPlaylist()
except (IndexError, EntryNotInPlaylist):