From fe5caa2a7c0bb6f17c6833b540691b4df4cbde90 Mon Sep 17 00:00:00 2001 From: pukkandan Date: Fri, 13 Nov 2020 03:05:29 +0530 Subject: [PATCH] Handle IndexError --- youtube_dlc/YoutubeDL.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/youtube_dlc/YoutubeDL.py b/youtube_dlc/YoutubeDL.py index 373e83715..c85cbd88f 100644 --- a/youtube_dlc/YoutubeDL.py +++ b/youtube_dlc/YoutubeDL.py @@ -830,10 +830,10 @@ class YoutubeDL(object): try: try: temp_id = ie.extract_id(url) if callable(getattr(ie, 'extract_id', None)) else ie._match_id(url) - except AssertionError: + except (AssertionError, IndexError): temp_id = None if temp_id is not None and self.in_download_archive({'id': temp_id, 'ie_key': ie_key}): - self.to_screen("[download] [%s] %s has already been recorded in archive" % ( + self.to_screen("[%s] %s: has already been recorded in archive" % ( ie_key, temp_id)) break