ITADN

-y does not work when argument is a list

#453Openlbschenkel 创建于 2024-12-09
L
lbschenkelcommented
Some `yt-dlp` arguments such as [allowed_extractors](https://github.com/yt-dlp/yt-dlp/blob/6fef824025b3c2f0ca8af7ac9fa04b10d09a3591/yt_dlp/__init__.py#L836) are expected to be a list. However, the code in `catt` that parses `-y` only supports boolean or plain strings: https://github.com/skorokithakis/catt/blob/ede9c03d1205d53bc31fc2bda52589d509c937a8/catt/cli.py#L72 I can think of two alternatives to improve on this: - hardcoding a few parameter names, such as `allowed_extractors` - having an heuristic, so if the argument value starts with `[` and ends with `]` the text inside is assumed to be a list Then if the value is deemed to be a list, it is parsed as such by splitting on commas.
0 条评论