From: nyorain Date: Fri, 5 Aug 2016 23:21:39 +0000 (+0200) Subject: Make --metadata-from-title non fatal X-Git-Url: http://git.oshgnacknak.de/?a=commitdiff_plain;h=5e42f8a0adec94156b911399558a967214a9d3aa;p=youtube-dl 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. --- 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