1
0
mirror of https://github.com/yt-dlp/yt-dlp.git synced 2024-11-02 09:12:40 +01:00

Handle IndexError

This commit is contained in:
pukkandan 2020-11-13 03:05:29 +05:30
parent 9a68de1217
commit fe5caa2a7c

View File

@ -830,10 +830,10 @@ def extract_info(self, url, download=True, ie_key=None, info_dict=None, extra_in
try: try:
try: try:
temp_id = ie.extract_id(url) if callable(getattr(ie, 'extract_id', None)) else ie._match_id(url) 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 temp_id = None
if temp_id is not None and self.in_download_archive({'id': temp_id, 'ie_key': ie_key}): 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)) ie_key, temp_id))
break break