mirror of
https://github.com/yt-dlp/yt-dlp.git
synced 2025-06-28 01:18:30 +00:00
[devalue] catch and yield IndexErrors
Authored by: bashonly
This commit is contained in:
parent
b547689d1c
commit
f4acb5726d
@ -77,7 +77,12 @@ def parse_iter(parsed: typing.Any, /, *, revivers: dict[str, collections.abc.Cal
|
|||||||
yield IndexError(f'invalid index: {source!r}')
|
yield IndexError(f'invalid index: {source!r}')
|
||||||
continue
|
continue
|
||||||
|
|
||||||
|
try:
|
||||||
value = parsed[source]
|
value = parsed[source]
|
||||||
|
except IndexError as error:
|
||||||
|
yield error
|
||||||
|
continue
|
||||||
|
|
||||||
if isinstance(value, list):
|
if isinstance(value, list):
|
||||||
if value and isinstance(value[0], str):
|
if value and isinstance(value[0], str):
|
||||||
# TODO: implement zips `strict=True`
|
# TODO: implement zips `strict=True`
|
||||||
|
Loading…
Reference in New Issue
Block a user