Allow escaped , in --extractor-args

Closes #2152
This commit is contained in:
pukkandan 2021-12-30 08:15:07 +05:30
parent 96f13f01a6
commit 042931a507
No known key found for this signature in database
GPG Key ID: 0F00D95A001F4698

View File

@ -1572,7 +1572,8 @@ def _dict_from_options_callback(
'--no-hls-split-discontinuity',
dest='hls_split_discontinuity', action='store_false',
help='Do not split HLS playlists to different formats at discontinuities such as ad breaks (default)')
_extractor_arg_parser = lambda key, vals='': (key.strip().lower().replace('-', '_'), [val.strip() for val in vals.split(',')])
_extractor_arg_parser = lambda key, vals='': (key.strip().lower().replace('-', '_'), [
val.replace(r'\,', ',').strip() for val in re.split(r'(?<!\\),', vals)])
extractor.add_option(
'--extractor-args',
metavar='KEY:ARGS', dest='extractor_args', default={}, type='str',