diff options
author | nyorain <nyorain@gmail.com> | 2016-08-06 01:21:39 +0200 |
---|---|---|
committer | Sergey M․ <dstftw@gmail.com> | 2016-08-09 03:56:22 +0700 |
commit | 5e42f8a0adec94156b911399558a967214a9d3aa (patch) | |
tree | 26cbe7e3bbf5b8c765976209ac0a8adba2c9e506 /youtube_dl/postprocessor/metadatafromtitle.py | |
parent | 1ad6b891b21b45830736698a7b59c30d9605a562 (diff) |
Make --metadata-from-title non fatal
Output a warning if the metadata can't be parsed from the title (and don't write any metadata) instead of raising a critical error.
Diffstat (limited to 'youtube_dl/postprocessor/metadatafromtitle.py')
-rw-r--r-- | youtube_dl/postprocessor/metadatafromtitle.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/youtube_dl/postprocessor/metadatafromtitle.py b/youtube_dl/postprocessor/metadatafromtitle.py index 42377fa0f..f7c831c67 100644 --- a/youtube_dl/postprocessor/metadatafromtitle.py +++ b/youtube_dl/postprocessor/metadatafromtitle.py @@ -38,7 +38,8 @@ class MetadataFromTitlePP(PostProcessor): title = info['title'] match = re.match(self._titleregex, title) if match is None: - raise MetadataFromTitlePPError('Could not interpret title of video as "%s"' % self._titleformat) + self._downloader.to_screen('[fromtitle] Could not interpret title of video as "%s"' % self._titleformat) + return [], info for attribute, value in match.groupdict().items(): value = match.group(attribute) info[attribute] = value |