youtube-dl

Another place where youtube-dl lives on
git clone git://git.oshgnacknak.de/youtube-dl.git
Log | Files | Refs | README | LICENSE

commit be80986ed9175af0a0fb216edfdfaeeb9769d1dd
parent 473e87064b7b60ea68147401a2e6487b715f25c8
Author: Sergey M․ <dstftw@gmail.com>
Date:   Sat, 17 Jun 2017 19:01:27 +0700

[postprocessor/metadatafromtitle] Fix missing optional meta fields (closes #13408)

Diffstat:
Myoutube_dl/postprocessor/metadatafromtitle.py | 9++++++---
1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/youtube_dl/postprocessor/metadatafromtitle.py b/youtube_dl/postprocessor/metadatafromtitle.py @@ -35,11 +35,14 @@ class MetadataFromTitlePP(PostProcessor): title = info['title'] match = re.match(self._titleregex, title) if match is None: - self._downloader.to_screen('[fromtitle] 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 - self._downloader.to_screen('[fromtitle] parsed ' + attribute + ': ' + value) + self._downloader.to_screen( + '[fromtitle] parsed %s: %s' + % (attribute, value if value is not None else 'NA')) return [], info