From 84601bb72b1ade8867e4a79635823b89ac6754eb Mon Sep 17 00:00:00 2001 From: pukkandan Date: Sat, 3 Apr 2021 13:59:55 +0530 Subject: Ability to set a specific field in the file's metadata Eg: `--parse-metadata "description:(?s)(?P.+)"` sets the "comment" field using `description` --- yt_dlp/postprocessor/metadatafromfield.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'yt_dlp/postprocessor/metadatafromfield.py') diff --git a/yt_dlp/postprocessor/metadatafromfield.py b/yt_dlp/postprocessor/metadatafromfield.py index 636199214..195c63f92 100644 --- a/yt_dlp/postprocessor/metadatafromfield.py +++ b/yt_dlp/postprocessor/metadatafromfield.py @@ -45,7 +45,7 @@ class MetadataFromFieldPP(PostProcessor): # replace %(..)s with regex group and escape other string parts for match in re.finditer(r'%\((\w+)\)s', fmt): regex += re.escape(fmt[lastpos:match.start()]) - regex += r'(?P<%s>[^\r\n]+)' % match.group(1) + regex += r'(?P<%s>.+)' % match.group(1) lastpos = match.end() if lastpos < len(fmt): regex += re.escape(fmt[lastpos:]) -- cgit v1.2.3