aboutsummaryrefslogtreecommitdiffstats
path: root/yt_dlp/postprocessor/metadatafromfield.py
diff options
context:
space:
mode:
authorpukkandan <pukkandan.ytdlp@gmail.com>2021-04-03 13:59:55 +0530
committerpukkandan <pukkandan.ytdlp@gmail.com>2021-04-03 14:07:28 +0530
commit84601bb72b1ade8867e4a79635823b89ac6754eb (patch)
tree59e2574419ac656d53bdf1df28ff204e400f417a /yt_dlp/postprocessor/metadatafromfield.py
parent54df8fc5b25a0c9d159a23f5cf9f1eabce1e6294 (diff)
downloadhypervideo-pre-84601bb72b1ade8867e4a79635823b89ac6754eb.tar.lz
hypervideo-pre-84601bb72b1ade8867e4a79635823b89ac6754eb.tar.xz
hypervideo-pre-84601bb72b1ade8867e4a79635823b89ac6754eb.zip
Ability to set a specific field in the file's metadata
Eg: `--parse-metadata "description:(?s)(?P<meta_comment>.+)"` sets the "comment" field using `description`
Diffstat (limited to 'yt_dlp/postprocessor/metadatafromfield.py')
-rw-r--r--yt_dlp/postprocessor/metadatafromfield.py2
1 files changed, 1 insertions, 1 deletions
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:])