Check parts properly inside a format key
This commit is contained in:
parent
7d33af60cd
commit
d7b31b5b35
@ -739,6 +739,11 @@ class YoutubeDL(object):
|
||||
|
||||
# We check that all the formats have the format and format_id fields
|
||||
for i, format in enumerate(formats):
|
||||
if 'parts' in format:
|
||||
for j, part in enumerate(format['parts']):
|
||||
if 'url' not in part:
|
||||
raise ExtractorError('Missing "url" key in result (index %d, part %d)' % (i, j))
|
||||
else:
|
||||
if 'url' not in format:
|
||||
raise ExtractorError('Missing "url" key in result (index %d)' % i)
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user